News for hackers. Stuff that matters.
Re:Building apps in minutes, not months by TeMPOraL on Friday September 17, 2021 @01:16PM (#28568053)
> obsession with how quick something is to understand immediately and be productive in—he gives the example of building websites in a single day, and contrasts it to musicians learning and mastering instruments over much longer periods of time.

That's an entirely orthogonal concern to what the article is about.

I agree that obsessing over the "zero to proficiency" time the way we do nowadays is very much counterproductive, for the reasons you mentioned. But you also want to be quick for a different reason - to make the tool better for the already-proficient user.

Rich also talked a lot about essential vs. accidental complexity. I don't know about you, but myself, the more I code, the more I feel 90%+ of my time spent on coding, and even a good chunk of the design/architecting time, is accidental complexity. This is not just a matter of bad APIs and overcomplicated design - the whole process of programming just takes too fucking long. The languages we use are not expressive enough, not succinct enough to capture our solutions. The tooling we use is not powerful enough to allow for an efficient exploration of the solution space.

So the other day I was writing some glue between two incompatible systems. I had my data structures well designed, I know how all the operations mapped. I would be able to write you a precise description of everything in an hour. It still took me more than a week to code it up. All the classes, functions, modules, files, syntax issues, gluing different types of error handlers, baah. Midway, I figured I made a mistake in the design. I knew how to correct it in 30 seconds. It would take a single sentence to explain the problem and the solution. It still took me an hour to implement the fix, because I had to change type signatures, move some files around, and update half a dozen places because it turns out you can't just automatically make bulk modifications in languages that aren't Java or C#. And don't get me started on how much time it takes to figure out the structure of a subsystem in a legacy code base...

Point being, even if you know your language and problem space inside out, even if you have decades of coding behind you, day-to-day coding still takes way more work than it should.

To me, existing tooling feels conceptually too low-level. Writing feels too low-level. One may counter that typing is mechanical, programming happens in the head - that's true, but at least to me, typing (and especially editing) still has enough overhead that I feel my brain slowing down. The feedback loop is too slow.

What I'd currently love to have is code editing environment operating on high-level semantic concepts. One keychord to select a function and display all its callers and callees, in a graph. One keychord to select a parameter and display a diagram of how it flows through code. One key to start inserting a class. One key for adding, deleting or editing anything that isn't a name or comment. References, files, folder structures handled automatically. Etc. Because if testing a single design variation will take me 10 minutes instead of half a day, then I might be able to test a bunch of them instead of committing to first one that feels reasonable.

</rant>

Re:Building apps in minutes, not months by ryandrake on Friday September 17, 2021 @01:40PM (#28568452)
To add to this, for the solution that takes you 30 seconds to articulate and 1 hour to code, let me guess---About 5 minutes of that hour is writing the business logic that solves the problem, and 55 minutes are things like: 1. Boilerplate: Headers and includes, function and variable declarations, comment blocks in the right place, class this, interface that; 2. Reformatting: casts, serialization, deserializating, data marshaling, transforming from one data structure to another; and 3. Refactoring: adding an argument to function X requires manual upstream changes in all 25 places that call function X, making data Y an enum instead of a bool requires identical changes in 50 other files. Crap like this is pure brain-off typing that takes the vast majority of the time you spend "coding."

I'd love to see better tooling that automates the crap and lets us focus on the actual business logic and value add.

Re:Building apps in minutes, not months by TeMPOraL on Friday September 17, 2021 @01:50PM (#28568615)
You're exactly correct. Like reading my mind. You've itemized the exact things that take 90%+ of any code I write. I didn't immediately notice it - it became apparent only when I realized I'm writing almost the same, tiny, simple business logic for the third time, and it still takes way too long than it should.

> serialization, deserializating

I shudder when I even see these words. In the past two years, they've been the bane of my existence! A significant chunk of my coding time was wasted on countless little XML and JSON serializers/deserializers, associated error handlers, error messages, type recasting, etc. This is 100% because of bad tooling. I'd consider automatic generators for these, but they're external things that don't integrate well - which comes with more devops and maintenance hassle downstream than the time they save. If I were doing Lisp at work, I could at least macro my way out of this pain, but alas.

And the worst thing is, these things aren't just "brain-off" time wasters. In recent months I've noticed I'm getting slowly but surely burned out by this. I can see myself slowing down halfway to finishing a feature or a bugfix, out of sheer mental exhaustion from dealing with bullshit.

Re:Building apps in minutes, not months by skydhash on Friday September 17, 2021 @02:13PM (#28568935)
Re:Building apps in minutes, not months by TeMPOraL on Friday September 17, 2021 @03:05PM (#28569645)
I'm not sure if I agree fully with its conclusion. I hope we'll figure better ways to eliminate glue code, or at least reduce it in size. Part of the problem is, it might be trivial to describe a data transformation between systems A and B in words, or even on a diagram, but it's still hell of a lot of work to put this in code. Again, accidental complexity abounds.

But beyond the data transformation glue code they're talking about, there remains the problem of boilerplate and glue code required by the programming languages and build tooling being not ergonomic enough to deal with concepts we have in mind directly.

Re:Building apps in minutes, not months by fifilura on Friday September 17, 2021 @03:40PM (#28570070)
This makes me smile and think back to the time I wrote business logic in pure SQL.

How free from most of those things my days were.

Just pure declarative logic. I have A and B, what is the shortest path to get to C?

But eventually I got tired of that too and back to what you describe.

Re:Building apps in minutes, not months by Karrot_Kream on Friday September 17, 2021 @04:56PM (#28570798)
Lol I ran into this just the other day. I've been trying to get a personal project finished before I head out on a trip in a few days, and due to lots of bad reasons (and I want to emphasize that these reasons are bad, not the language, partially because I made the choice while intoxicated) I chose Rust. The thing itself is just supposed to spawn a few other processes, check success statuses, and write some logs. I got caught choosing between accepting strings, PathBuf, Path, and AsRef<Path> for spawning subprocesses. I had to write my own error type, with `thiserror`'s help, in lieu of a stack trace to understand why my code was failing in portions. If I had done this in Python it would have taken a third of the time. Now obviously by choosing my types, ownership semantics, and data structures more carefully than Python's stdlib+runtime results in a much lower memory overhead and less CPU used, but I find myself constantly asking myself if it was really worth it (especially since I'm frustrated with my upcoming trip deadline). I'd love a world where I didn't need to make such a stark choice; where I could get the convenience of stack traces, errors, and fast iteration, without the performance hit that a heavily dynamic language like Python gives you.

</another rant>

Re:Building apps in minutes, not months by spinningslate on Friday September 17, 2021 @01:51PM (#28568630)
not sure I agree with your 'wants' at the end, but I do want to frame the earlier paragraphs. I feel that pain too. Fred Brooks thought we'd largely have eliminated accidental complexity by now [0]. The "out of the tar pit" paper [1] tackles that and shows it's hard.

But if anything, accidental complexity has got worse. Go back 30 years and a useful command-line tool could reasonably be coded in a single .c file, compiled in a single command, then run.

Now: full-stack web apps are a lot more complex than command line tools. But, with contemporary tooling, the accidental complexity has scaled at least linearly, probably worse. Just setting up a front end dev environment is a lesson in complexity theory. And then there's manually crafting the UI-to-service messaging, k8s deployment templates, build pipeline, and all the other tasks that have nothing directly to do with the actual functional requirements.

I don't know what the answer is. Per other posts in the thread, I don't think it comes from conflating "0 to expert in 12 hours!" with "productive tools for skilled and experienced users". Low/no code fits into the former category (and maybe has a place, I don't have an opinion there). I don't see much addressing the latter space.

[0] https://en.wikipedia.org/wiki/No_Silver_Bullet [1] https://github.com/papers-we-love/papers-we-love/raw/master/...

Re:Building apps in minutes, not months by kitd on Friday September 17, 2021 @02:32PM (#28569196)
Just setting up a front end dev environment is a lesson in complexity theory

FWIW, because I've been out of web dev for a while and may need to get back into it, I came across this site today:

https://modern-web.dev/

I followed their example ts+preact+esbuild setup and was very pleasantly surprised by the ergonomics.

I was expecting way worse.

Re:Building apps in minutes, not months by pdimitar on Friday September 17, 2021 @06:57PM (#28571830)
> ...the whole process of programming just takes too fucking long. The languages we use are not expressive enough, not succinct enough to capture our solutions. The tooling we use is not powerful enough to allow for an efficient exploration of the solution space.

I lately started getting very sick of web dev (which I practice since 2009; way too long). This in turn made me scared for my future income but that's a different story. :D

...I completely agree that trivial shit takes way too long to create or update. Just today I complained on ElixirForum (not to the core team members of Phoenix, just in general) that nowhere in web dev do we have stuff like "make controller.param.add" (which will not just modify the controller but everything that depends on it) or "make controller.param.change_type" (which would generate / edit boilerplate for validation) or "make template.root.change_css_kit" (ha-ha, that one will only happen when AGI is invented!).

I want a program that can modify programs, doing the text editing for me, structurally, not just regexes or even a bit semantic-more-like grouping of text (even that's not good enough). I won't reach for LISP even though I am fairly sure it being homoiconic will make this much easier, because no LISP runtime of any dialect offers transparent parallelism a la Erlang/Elixir or the compile-time guarantees of Rust. But I do sometimes wish all languages were homoiconic regardless. :(

Maybe I'll just gather some money and then just work on tooling that can do the above-described tasks.

I won't fall into the trap of thinking that detailed UML diagrams can lead to 100% correct code generation (although I am tempted to this day!). But there has to be a better way than us wrangling characters on the screen manually all the time.

And it's not even about typing. I enjoy typing.

It's about the menial nature of many tasks. They just... kill you. They slowly drain all your creativity and dreams about the future and desire to change things for the better around you. One day you catch yourself just wishing the work week passed by quicker.

We have to do something! But yeah, we're all slaves to the wage. I wish more of us were like @codinghorror; be rich enough to just one day ping a few buddies and say "hey guys, I am bored -- let's make a forum system" and boom, some years later you have Discourse that's being used more and more everywhere each day.

I wish all of us could as casually work on stuff we love as Jeff Atwood did.

<long-sigh-ends-here>