Settings

Theme

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

github.com

65 points by icemanx 3 years ago · 47 comments

Reader

marcc 3 years ago

The "AI Not Welcome Here" is interesting at the bottom of the Readme.

https://github.com/MrIceman/go-uml#warning---ai-not-welcome-...

This is a pretty hard stance to take when creating an OSS project. The author made an open source, MIT-licensed repo. Right now, the statement reads "I wrote this all myself". Does that mean the author is not willing to accept PRs?

Or will we see something like a DCO that developers make an attestation that AI was not used in creating the change?

  • lib-dev 3 years ago

    > Right now, the statement reads "I wrote this all myself".

    He says, "all the code in this repository _that_ was written by me" was, if fact, hand-written by him rather than auto-generated by a tool like copilot.

    I read it as he is open to contributions and if you want to use AI that's allowed but he notes that he does not and he provides a rationale to boot. Fine by me.

Veuxdo 3 years ago

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.

  • taeric 3 years ago

    Depends heavily on the diagram?

    I go farther, all told. I think any sort of diagram should almost certainly be process/pipeline based. Parts can be generated by a declarative markup, certainly. But you need a pipeline to "hand tune" things or you will end with diagrams that are clearly generated by a program. Fine for some things, sure. But there is a reason most of the diagrams that you remember the looks of were bespoke authored in a much more graphical environment.

    • smoyer 3 years ago

      If this was used as a generator, you could include actual type names, godoc comments (on mouse over for smarter image formats), etc. In this case, it's the fact that the rest of the code could provide context.

  • sn9 3 years ago

    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.)

  • cle 3 years ago

    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.

  • datadeft 3 years ago

    Like D2? I love it.

    https://play.d2lang.com/

  • HyperSane 3 years ago

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

huydotnet 3 years ago

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.

  • cle 3 years ago

    The author explicitly discusses requirements:

    > You don't need to download any dependencies such as plantUML or Graphviz, which is what most of the tools out there require and what was also my motivation to start this project. go-uml is using a 2D graphics engine written 100% in Go https://github.com/fogleman/gg

    This is not a solution for these requirements.

  • fleur-de-lotus 3 years ago

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

azubinski 3 years ago

My respect to the author for the principled position.

maister 3 years ago

> Warning - AI not welcome here

> 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. I became a software developer because of my passion for our craft - Software Engineering. I build this tool because I enjoy programming. Every single line of code you'll read in this repo, that was written by me, is produced first in my mind and then manifested into reality through my hands. I encourage any contributor to follow the same principle, though I can't and don't want to put any restrictions on this. Just like people stopped walking because they commute by cars and trains, which caused an increase in obesity and illness, I believe that the massive usage of AI will cause people to stop thinking and using their minds and the resulting havoc is unthinkable.

AI Gatekeeping... What a time to be alive!

pachico 3 years ago

I use PlantUML every single day. It can be embedded in Markdown docs and even Confluence (which I hate but I'm forced to use).

Diagram as Code is simply awesome. My only issue is how ugly it looks, even using themes.

I wish an application managed to be a drop in replacement that looked like it wasn't drawn in MS Paint in 1996.

kerblang 3 years ago

Nice idea.

I think there's an error in the last diagram. The arrow pointing at User A should point at User B.

(And look it's possible to say something other than blithering about AI controversy. The author doesn't like AI, get over it)

zelphirkalt 3 years ago

I do not see any different kinds of edges in the diagram. Is only one kind of message supported, or is perhaps the example not chosen to include all kinds of message/returns?

Xeronate 3 years ago

Nice work, but seems like WSD accomplishes the same with a nicer syntax and hosted interface https://www.websequencediagrams.com/

alecnotthompson 3 years ago

According to author, they're either fat or have never ridden in a car.

umvi 3 years ago

"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 to try power saws and power drills because craftsmanship will be lost compared to using handsaws and awls + hand drills. In my opinion, AI tools greatly enhance my craftsmanship by both saving me time and by suggesting solutions I didn't even know existed (most recent example being JS .every() and .some() - I was about to roll my own every/some equivalent with loops)

  • codegeek 3 years ago

    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.

    • umvi 3 years ago

      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.

  • CodeWriter23 3 years ago

    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.

    • apgwoz 3 years ago

      Saws certainly can project a laser beam across the cutting surface, and don't get me started about AI powered CNC cuts. I mean, just the other day I found the words "WHY ARE YOU IGNORING ME?" CNC'd onto a piece of plywood I left in my shop. I didn't do that by hand.

    • umvi 3 years ago

      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.

  • musha68k 3 years ago

    “I believe that the massive usage of AI will cause people to stop thinking and using their minds and the resulting havoc is unthinkable”

    Immediate utility aside that’s a probable prediction by the author though.

    Let’s hope the optimists will be right…

    https://github.com/MrIceman/go-uml#warning---ai-not-welcome-...

    • EFreethought 3 years ago

      Some of the AI predictions make me think about a quote from "Dune":

      Once men turned their thinking over to machines in the hope that this would set them free. But that only permitted other men with machines to enslave them.

    • deepsun 3 years ago

      Was it Homer who said that writing dulls the minds, and real poets use their mind to remember everything?

  • waynesonfire 3 years ago

    "artisanally developed. all reference material and manuals were read from printed text"

  • vlunkr 3 years ago

    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

    • umvi 3 years ago

      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.

  • drewcoo 3 years ago

    > like a carpenter refusing to try power saws and power drills because craftsmanship will be lost compared to using handsaws and awls + hand drills

    Rejecting AI-backed software tooling reminds me more of Amish power tools.

    https://www.npr.org/sections/money/2013/02/22/172626089/insi...

    • umvi 3 years ago

      Wow... it's like the Law of Moses come full circle (finding loopholes in the letter of the law to skirt the spirit of the law)

  • r0l1 3 years ago

    I don't use these tools, due to privacy concerns. Once there is a capable offline model, I will be open to give it a try.

  • dimator 3 years ago

    isn't it closer to "a carpenter refusing to offload the design of subassemblies to an alien whose understanding of carpentry is completely opaque"?

    although, i suppose, to your point, even an alien could introduce a skilled carpenter to a new table saw technique.

  • deepsun 3 years ago

    Same thing people said for years about power IDEs vs. advanced notepads.

  • thunky 3 years ago

    Oh but you're missing the upside: now we can sell "handmade" software and charge extra for it. Just like soap. And even better, it can be less effective and have a shorter shelf life.

mevric 3 years ago

Love the thought mentioned the warning section https://github.com/MrIceman/go-uml#warning---ai-not-welcome-...

  • warent 3 years ago

    I don't. It's fine making a personal choice to not use AI, but to go on to just openly insult anyone who uses AI is absurd and too far. Everyone is allowed their choices and we should respect that. The doom-whispering is not charming or insightful, good grief.

    • kitd 3 years ago

      I didn't read any insult. I don't agree with the author but all I perceived was encouragement against using AI, not personal denigration for doing so.

    • mevric 3 years ago

      Agreed. I use AI to speed up my work and love the process of discovering new ideas.

      I was referring to the following line.

      "Just like people stopped walking because they commute by cars and trains, which caused an increase in obesity and illness"

      • tester457 3 years ago

        If LLMs are transportation, here's to hoping we have a Netherlands like solution, with lots of bicycles and trains for longer distances, meaning lots of healthy people.

        Instead of "car-dependency" we should try to use LLMs as bicycles for the mind, still putting effort into every mental pedal.

      • IshKebab 3 years ago

        But people didn't stop walking...

    • robbywashere_ 3 years ago

      This is a typical Ai-ist stance, us warm blooded norm-coders are absolutely sick of this rhetoric!

  • cirrus3 3 years ago

    It seemed pretty cringy to me

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection