News for hackers. Stuff that matters.
Re:Businesses are in for a mighty debt hangover by tunesmith on Tuesday May 16, 2023 @07:04PM (#35968929)
All I know is that computer programming is qualitatively an entirely different thing than it was six months ago, different than it has ever been in the decades preceding. Programmers that never had to think about "what" to do are are just implementation machines are going to be hurt by this. Programmers that have to think hard about strategy, design, specification are about to be massively more productive. The ability to clearly communicate specifications; "what to do"; is more valuable than ever because it's the one way to unlock massive productivity gains.
Re:Businesses are in for a mighty debt hangover by packetlost on Tuesday May 16, 2023 @07:23PM (#35969128)
> All I know is that computer programming is qualitatively an entirely different thing than it was six months ago

Citation needed. My day to day has not changed one bit, even if I'm using Copilot and ChatGPT. I get marginally faster autocomplete and a buggy template engine. This type of comment is exactly what GP means when they say "grossly overestimated."

Re:Businesses are in for a mighty debt hangover by jimsimmons on Tuesday May 16, 2023 @07:33PM (#35969222)
Somehow all the non programmers are in full force telling actual coders how their job is changing
Re:Businesses are in for a mighty debt hangover by sublinear on Wednesday May 17, 2023 @02:24AM (#35971882)
This is so blindingly obvious to anyone and I can't believe it's not said enough
Re:Businesses are in for a mighty debt hangover by fnordpiglet on Tuesday May 16, 2023 @08:33PM (#35969765)
I use ChatGPT throughout the day. I don’t find code completion very useful, but I ask questions about esoteric areas I’m unsure of, or about some numerical technique I’m trying to recall. It unblocks me faster than anything I’ve ever used and I’ve learned more about some topics in the last six months than in the last thirty years. The fact I can ask elaborative questions and get answers that are fairly deep and nuanced is remarkable. Code it emits is often specious but fairly close to usable, more than enough to open a door for me in what used to be hours of fruitless searching and reading countless stack overflow answers telling the questioner they’re asking the wrong question and answering something unrelated instead.

That you guys aren’t finding the value tells me you’re using the tool wrong and likely have already decided with prejudice, because I have primary experience that once you try to figure out how it’s useful, you’ll find remarkable utility waiting. It’s ok, man. I’m sure many folks found the computer useless too.

Re:Businesses are in for a mighty debt hangover by packetlost on Tuesday May 16, 2023 @08:39PM (#35969820)
The quality of answers goes down dramatically the more niche your questions are. Further, while it might be helpful for "research", the answers it gives will have very wide variations of accuracy and isn't very useful for the day to day work of an actual software engineer which involves much more than just writing code. It works great if you treat it like a freshman in college who loves hearing their own voice and bullshits answers, but not great at being a fact engine.
Re:Businesses are in for a mighty debt hangover by fnordpiglet on Wednesday May 17, 2023 @12:32AM (#35971276)
This explains fairly clearly a bit of rust that, while not the most obscure, is IMO fairly poorly explained in most resources I’ve found, and covers a lot of edges that are really useful to understand… I can keep digging and digging into the details presented. I find it absurd to say it’s like a freshman in college - I’d love to hire those freshman if you can point them out:

> Explain when pin is important in rust when dealing with asynchronous code, particularly when dealing with Box<dyn> types.

In Rust, Pin is a concept that is central to understanding the implementation of asynchronous operations. To explain why, let's first cover the basics.

Asynchronous tasks often involve future types that encapsulate a computation that will produce a value at some point in the future. These futures may need to poll other futures, which in turn might not be ready, causing them to be suspended and resumed later on. This suspension and resumption is where the Pin concept comes in.

By default, Rust allows moving types around in memory. However, when you have self-referential structures, like many of the future types in asynchronous programming, this can lead to problems. A future may hold a reference to another part of itself, and if the future is moved in memory, that internal reference may become invalid.

Pin is Rust's solution to this problem. If a type is "pinned" (wrapped in a Pin), it is a guarantee that the memory location of the value inside will not change. This means that you can safely keep references to different parts of the same structure because you know they won't move around.

Box<dyn Future> is a heap-allocated future object. Using Pin with Box<dyn Future> (i.e., Pin<Box<dyn Future>>) is common in async code because it guarantees that the future object will not be moved around in memory, making it safe to poll.

However, one should note that simply creating a Pin<Box<T>> does not mean that the T will stay put; it's also necessary to ensure that T does not move itself or its interior around. The contract of Pin is such that, once a value has been pinned, it is not allowed to move or have its memory invalidated until it is dropped. For a type to uphold these guarantees, it must be Unpin or ensure that all its operations maintain these guarantees. Most native Rust types are Unpin and therefore don't need to worry about these guarantees.

In short, Pin is important in Rust's async code as it provides a mechanism to safely handle self-referential structures, which are common in async programming. The Rust async ecosystem uses Pin to ensure that once a future begins executing (is polled), it will remain at a fixed location in memory until it has completed.

Re:Businesses are in for a mighty debt hangover by steveklabnik on Wednesday May 17, 2023 @01:10AM (#35971481)
This is also a good demonstration of how it can be slightly wrong, or maybe misleading

> If a type is "pinned" (wrapped in a Pin), it is a guarantee that the memory location of the value inside will not change.

Pin is a wrapper around a pointer type and disallows moving the value that that pointer points at. You don’t pin a value, you pin a reference to a value. IMHO this sentence is unclear about that.

You sorta get the right vibes from the rest of the post, but there’s a major important concept in here it explains decently but also just wrong enough that you may internalize the incorrect thing.

Re:Businesses are in for a mighty debt hangover by fnordpiglet on Wednesday May 17, 2023 @12:46PM (#35977937)
Interestingly I read what it said as precisely what you said. But you’re right it elides the crucial nuance that the pointer is pinned, and “the value inside” can ambiguously be read as the type is a value and not a pointer to a value. I read “inside” to mean “inside the pinned pointer” but it can (maybe more accurately?) be read as inside the pin is a value.

I agree - it’s not a panacea devoid of human involvement. I think really importantly, whatever failings the technique has, it’s reflective of humanity itself, and humans are often slightly wrong or misleading. I think confusing it’s output with that of a deterministic program is wrong - it’s much more akin to the output of a human than not.

My argument though is it’s not a freshman in college level of human failings. It’s clarity is far beyond that on many subjects, and it’s facility to “understand” is remarkable for a human let alone a computer. The fact I can interrogate it and ask it the clarifying question you bring out is beyond useful - I can dig into the specific areas of confusion I have, and often if it’s wrong I’ll cop to it unlike a human oracle.

> Clarify then: If a type is "pinned" (wrapped in a Pin), it is a guarantee that the memory location of the value inside will not change.

When we say "the memory location of the value inside will not change," what we mean is that the value that the pointer points to is guaranteed to not move in memory. This is a critical guarantee when working with certain types of data, like self-referential structs or certain async code in Rust.

Let's take an example of Pin<Box<T>>. Here's what it means:

Box<T>: This is a heap-allocated instance of T. The Box is a smart pointer that points to this heap-allocated T. Pin<Box<T>>: This is a Pin wrapping the Box. This means that the T that the Box points to is pinned. This does not mean that the Box itself cannot be moved. The Box is a pointer, and pointers can be copied and moved freely. But because we have used Pin, the actual heap-allocated T that it points to cannot be moved. This is what we mean when we say "the memory location of the value inside will not change." We're talking about the T, not the Box.

This is important when the type T has self-references, because moving T in memory would invalidate those self-references. By using Pin, we ensure that T stays put, and those self-references remain valid. This is a key part of the design of Rust's async programming model.

However, this guarantee is only upheld as long as the type T does not implement Unpin, which is a marker trait that indicates that it is safe to move a type out of a Pin. Types that are not Unpin uphold the guarantee that they cannot be moved out of the Pin once they are placed in it.

Re:Businesses are in for a mighty debt hangover by steveklabnik on Wednesday May 17, 2023 @01:26PM (#35978520)
> I think really importantly, whatever failings the technique has, it’s reflective of humanity itself, and humans are often slightly wrong or misleading.

Absolutely, and I don't think every explanation has to be perfect to be useful, hence me saying "you gotta watch out" and not "fuck this tool, nobody should use it."

Re:Businesses are in for a mighty debt hangover by yobbo on Wednesday May 17, 2023 @06:05AM (#35973274)
It may give you explanations/code of numerical methods that run and look very plausible, but are subtly wrong; and you have to know both the language and methods in order to untangle the bug.

But I have found asking questions like "how would I ..?" or "explain ..?" can be useful as long as you don't treat like a final answer.

Programming is one of the fields were correctness actually matters in a binary way. But jobs where "sort of" or 80% is good enough can be replaced with language models.

Re:Businesses are in for a mighty debt hangover by andresp on Wednesday May 17, 2023 @07:28AM (#35973812)
The quality of the answers is often too poor to be used as reference.
Re:Businesses are in for a mighty debt hangover by carlosjobim on Wednesday May 17, 2023 @07:52AM (#35973992)
> All I know is that computer programming is qualitatively an entirely different thing than it was six months ago

^ Your citation, sir.

Re:Businesses are in for a mighty debt hangover by tunesmith on Wednesday May 17, 2023 @04:37PM (#35980960)
I am the primary source of my opinion, give me a break. I'm sharing my own personal experience; it is therefore not an "estimation".

I will say that checking back a day later, I am stunned at how many smart programmer types are clearly not even close to getting how useful this tool is. For people that don't find it very helpful, to me that just means they're not asking enough of it yet. More people just need to spring for the $20/month and start asking GPT4 about any old technical subject they think they know well but about which they might also have holes in their knowledge.

It's a tool that rewards creativity, so you kind of get out what you put in. Many folks here are too young, but back when search engines were coming out, there was a phase for many people where they only knew how to treat it as a toy. Like, search for their own web page to see if it showed up; search for a question they already knew an answer to to see if it was correct. It required a bit of a mental reset; a "click"; before each person would know automatically, without reminding themselves, that they could actually search for things they didn't know.

It seems like there is something similar going on here. It's not a search engine so it's not exactly about stuff we do or don't know, but I gather that a lot of people thus far have not uncovered the advantages it actually gives them.

Re:Businesses are in for a mighty debt hangover by MuffinFlavored on Tuesday May 16, 2023 @07:16PM (#35969066)
> Programmers that never had to think about "what" to do are are just implementation machines are going to be hurt by this

what is the most popular low-code/no-code solution that i could bring into an enterprise organization that can:

* read/write to/from a database

* read/write to/from a message queue

* read/write to/from a cache

* make HTTP API calls and do light ETL/logic on the request/response bodies

* OutSystems: This is a popular choice for enterprise organizations, as it provides robust low-code development capabilities. It supports integration with databases, message queues, and caches. It also allows developers to make HTTP API calls and perform light ETL operations.

* Mendix: Another popular choice for enterprise-level applications. It offers a wide range of features, including database integration, message queue handling, cache interaction, and HTTP API calls.

* Microsoft Power Apps: This platform is part of the Microsoft Power Platform, which also includes Power BI for data visualization and Power Automate for process automation. It supports data integration, including reading and writing to databases, and can make HTTP API calls.

* Appian: This is a low-code platform that allows the creation of apps that can integrate with databases and make HTTP API calls. It may require additional configuration or use of additional services for interaction with message queues and caches.

* Zoho Creator: Zoho Creator is a low-code application development platform that allows users to create custom applications with minimal coding. It can integrate with databases and make HTTP API calls, but may not natively support interaction with message queues and caches.

These aren't new and I'm still employed

Re:Businesses are in for a mighty debt hangover by saiya-jin on Wednesday May 17, 2023 @03:55AM (#35972422)
Yeah all this doomsday prophets for software engineers is just situation that keeps repeating itself. I've seen OK code generation around 2006. So what if it got a bit better? That's not how entire projects get done, code part is rather miniscule in most organizations that aren't single-focused startups.

The less you are just a pure code monkey and nothing more, and the more you bring added value of actually managing whole software dev lifecycle the less you are replaceable (and more senior you become with all the + and -). Chasing requests from teams that couldn't care less about your projects, navigating process hell, synchronizing with global teams, evaluating various pitches and proposals, hiring, architecture design, testing team interaction/management, internal politics and so on and on. This is still software engineer territory, albeit senior one (in my massive org I am at lowest dev position, but with salary 2 levels higher, and I get to do this and much more).

I've not seen even an attempt to put any dent on job market for those skillsets. If you are worried, ramp up your skills, thats what one should be doing regardless.

Re:Businesses are in for a mighty debt hangover by MuffinFlavored on Wednesday May 17, 2023 @11:10AM (#35976404)
> That's not how entire projects get done

Devil's advocate: it takes visionaries at the top (CEO/management) to push for things like "that may not be not how entire projects get done today, but maybe in the future if we can get a good low-code solution that does what we want well, we could save a lot of money"

Is it a pipe dream? I don't know. That's where good execution comes into play.

Re:Businesses are in for a mighty debt hangover by projektfu on Wednesday May 17, 2023 @07:57AM (#35974040)
I've been playing around with PowerQuery in Excel to do some ETL work. It's pretty nifty and goes a lot farther than Excel used to, and in many ways it's better than other tools I've used.

And yet...

To do a few things I consider basic, you need to write nontrivial code. The two examples recently:

1. To strip non-digits from phone numbers, I needed to edit a step in the query by hand to add Text. Select. It doesn't seem to be accessible from the GUI.

2. To roll three columns up into one by replacing nulls with values from the next column, I had to write a lambda for List.Accumulate. Again, not available in the GUI, and probably not something a low-code user could hack. I think they'd have to pull it into Excel and then use a long IF formula to get there.

Low code can also be really slow when you think it's just gotta do what you want, but it doesn't, and you need to code it. However, a good platform can get the annoying bits out of the way, and the auto-preview features the platforms usually have are great.

Re:Businesses are in for a mighty debt hangover by irrational on Tuesday May 16, 2023 @07:30PM (#35969188)
I work as a programmer for a Fortune 100 company that everyone on the planet has heard of. I have heard nothing from any other developers about using AI. The programmers are not talking about it, the company is not talking about it. I don't know if we are behind the times or if this isn't as big a thing as you are making it out to be.
Re:Businesses are in for a mighty debt hangover by SoftTalker on Tuesday May 16, 2023 @07:34PM (#35969239)
I've been doing programming for 30+ years and having a hard time seeing how AI will help me.

I have templates and scaffolds for most of my reptitive work already. I feel that I'm good enough with SQL that it would take me longer to prompt an AI to write a query than it would for me to just write it.

I am open to the possibility that I'm old and set in my ways but it's been a long time since the act of writing the code has been the bottleneck in my work.

Re:Businesses are in for a mighty debt hangover by kylelahnakoski on Tuesday May 16, 2023 @07:52PM (#35969421)
The greatest benefit I have seen so far is using AI for composing code in unfamiliar frameworks and languages. You do not need to read the docs. It is a stackoverflow killer.

If you already can speak the language, the best it can do is provide the boilerplate.

Re:Businesses are in for a mighty debt hangover by SoftTalker on Tuesday May 16, 2023 @08:23PM (#35969677)
I see. That makes sense. I don't compose code in unfamiliar frameworks and languages. I try as much as possible to use the frameworks and languages I know best. I got off of the treadmill of "framework of the year" chasing a while ago.
Re:Businesses are in for a mighty debt hangover by tunesmith on Wednesday May 17, 2023 @04:28PM (#35980851)
I think this is an example of how it's all different now though. Switching costs have all of a sudden decreased dramatically. There is less cost to picking the right tool for the job. Programmers that brag about having the perfect set of templates and shortcuts and that can code in their chosen language like water and so therefore have no interest in switching to any other language... they're more at risk than the ones with broader experience.
Re:Businesses are in for a mighty debt hangover by FeepingCreature on Wednesday May 17, 2023 @03:33AM (#35972291)
I've been using it for a few days. It's not very useful (to my usecases), but it is extremely fun. It's like pairing with a golden retriever.
Re:Businesses are in for a mighty debt hangover by tunesmith on Tuesday May 16, 2023 @07:46PM (#35969353)
"Hi ChatGPT, here's a schema for an old MySQL 5.5.x table. Can you give me a "Legacy" play-slick case class and table class that reflects that schema, using Scala Play 2.8.x and play-slick 5.x? Can you rewrite that schema to a MySQL 8.x table, using your recommendations of best practices and naming conventions? Can you suggest the new schema to me in the form of a play-slick evolution? Also can you give me a slick case class and table class that reflects the new schema?"

I've rewritten portions of a legacy side project in three days, what would have taken me weeks without GPT4. And beyond the simple time estimates, there are the tasks that I just simply would not have attempted otherwise.

Re:Businesses are in for a mighty debt hangover by yamtaddle on Tuesday May 16, 2023 @07:50PM (#35969397)
At least so far, it's really not a big deal. It's sometimes better than search at answering questions about well-known APIs or whatever, but can't do anything very complex without running into trouble, and will happily make up plausible-looking but entirely wrong code when it doesn't know the answer.

It's like a barely-got-a-passing-grade coding bootcamp grad with above-average-for-that-cohort Googling skills and a problem with dishonesty. Sometimes that's helpful, a little, but mostly it's a time-wasting distraction.

What it can revolutionize in its current form is mainly limited to high-automation bullshit industries. Spammers, scammers, certain kinds of marketing content that's currently farmed out to the lowest bidder, astruturfed media campaigns, targeted mass propaganda. That part, I think will be big, but will be entirely bad for society. Unless it makes another leap forward at least as big as the last one, programming's nowhere near being threatened yet, nor, even, is most writing that's not already bullshit-heavy (though it'll help make normal writing somewhat more efficient, probably)

Re:Businesses are in for a mighty debt hangover by tunesmith on Tuesday May 16, 2023 @08:02PM (#35969507)
The above is only true for GPT3.5 (and probably underestimates that as well). But completely false for GPT4.

I had a bunch of deeply-nested map/flatmap code and it rewrote it into a short pretty for-comprehension, error free. For those that haven't learned those desugaring rules cold, it's a massive help.

Re:Businesses are in for a mighty debt hangover by epicureanideal on Wednesday May 17, 2023 @02:02AM (#35971762)
Isn't that the kind of thing an IDE could be able to do, just by programmatically swapping between the choice of syntax to express the same logic? Aren't there a relatively small, finite number of these cases that would cover a large percent of typical transformations, and do so with 100% reliability?
Re:Businesses are in for a mighty debt hangover by FeepingCreature on Wednesday May 17, 2023 @03:25AM (#35972249)
Sure, given a buggy and brittle bundle of special cases. That sort of thing can work, I'd presume, if you use an IDE that's deeply integrated with your compiler and language development. With third-party tools, version skew alone makes it untenable, let alone that the amount of transformations you could want is basically unbounded.

The cool thing about GPT is that it understands code contextually and flexibly. I can literally throw it syntax that was developed specifically for a single project, that it's almost certainly never seen before, and as long as it's similar to something it's seen elsewhere, GPT can figure it out. There's no way you're getting that from an IDE feature.

I got GPT 3.5 to transform a (simple) function into return-early style a few days ago. It didn't quite get it right, but it got the correct idea. I did this by typing "Transform this code into return-early style." With an IDE feature, I'd have to hope the developers had heard of and cared about return-early style in the first place, and then that their tool was powerful enough to realize when and how to apply it. (Highly unlikely, IMO.)

edit: In other words,

> Aren't there a relatively small, finite number of these cases that would cover a large percent of typical transformations, and do so with 100% reliability?

I believe the opposite is the case.

Re:Businesses are in for a mighty debt hangover by tunesmith on Wednesday May 17, 2023 @04:26PM (#35980828)
Can an IDE answer followup questions of how those sugaring rules worked, and suggest other alternative formulations if I want part of it to be more explicit?
Re:Businesses are in for a mighty debt hangover by bluedino on Wednesday May 17, 2023 @08:11AM (#35974158)
I work as a programmer for a Fortune 100 company that everyone on the planet has heard of. I am sick of hearing about using AI. Everyone is talking about it, the company has meetings about it every week, we've came out with policies about using public LLM's like ChatGTP for company purposes.
Re:Businesses are in for a mighty debt hangover by ChatGTP on Tuesday May 16, 2023 @07:10PM (#35968984)
Won’t this be actually bad for the economy ? I’m personally not spending as much because I’m not clear if I’ll have a job when ChatGPT-5 comes out.

I’d say many people are doing similar things ?

Less jobs is not necessarily a good thing ?

Re:Businesses are in for a mighty debt hangover by mikea1 on Tuesday May 16, 2023 @07:37PM (#35969273)
> Less jobs is not necessarily a good thing ?

The rollout of the lightbulb significantly reduced the economic potential of candlemakers, but it improved the quality of life for society overall. So, whether technological advancement is a "good thing" depends on which group you are in: the one with obsolete skills or the one that benefits from cheaper and/or better goods and services. Either way, the overall economy benefits from creative destruction.

[0] https://en.m.wikipedia.org/wiki/Creative_destruction

Re:Businesses are in for a mighty debt hangover by SoftTalker on Tuesday May 16, 2023 @07:38PM (#35969280)
Not having to pay developers 6-figure salaries might be a good thing in the big picture.
Re:Businesses are in for a mighty debt hangover by epicureanideal on Wednesday May 17, 2023 @02:04AM (#35971771)
Or ideally, we can keep making 6-figure salaries, but be able to accomplish more in the same number of hours.
Re:Businesses are in for a mighty debt hangover by nathan_compton on Tuesday May 16, 2023 @08:16PM (#35969621)
I admit GPT4 is useful, and I have been using it extensively in a fair number of different projects lately. And all it does for me is save time typing. I still have to think exactly the same amount I had to before. I do think its going to improve efficiencies and there will be moderate economic effects, but I also wouldn't say programming is qualitatively a different thing. In a few years, who knows? But the main issue as I see it is that ultimately programs must interact with the real world and solve problems for which there is not an abundance of training data. It isn't that I think it is impossible to build AIs to work in those domains, but I think our current approaches might be slower getting there than the leap to GPT4 encourages us to believe.
Re:Businesses are in for a mighty debt hangover by sublinear on Wednesday May 17, 2023 @10:25PM (#35983530)
Have you ever considered that "how" to do something is pretty much always several orders of magnitude more complicated than "what" to do?

Wouldn't it make more sense to have LLMs replace middle management? Knowing "what" to do is way easier to predict. Even the worst programmer is far better organized than the people gathering the requirements and they have to fill in the blanks all the time. These are junior programmers who know fuck all about a business yet manage to know more about the project overnight compared to management that's been there for many years!

Re:Businesses are in for a mighty debt hangover by tunesmith on Wednesday May 17, 2023 @10:41PM (#35983608)
My perspective is pretty much opposite yours. A really common trouble is when programmers implement a working solution to a poorly understood problem. Building a good specification is oftentimes much, much harder than implementing that specification.

Maybe what you're referring to is what happens in a lot of software organizations, where the "what" is often just phrased as a poorly-thought-out, loose problem, and it's actually up to the developer to come up with the specification and the implementation at the same time. But that's not what I'm talking about. What I'm saying is that if you're good at specification, your job is about to get a whole lot easier, and therefore more valuable, by using these models.

Re:Businesses are in for a mighty debt hangover by sublinear on Thursday May 18, 2023 @01:58AM (#35984534)
You're right. I appreciate this comment. This is what people come to HN for. Thanks. Fat chance finding any traction with getting devs at those orgs your just described getting traction even with the LLM backing them. People don't like to be wrong. The status quo will continue, perhaps indefinitely. I also still have my doubts that an LLM can be smarter than a fresh-out-of-college junior dev.
Re:Businesses are in for a mighty debt hangover by tunesmith on Thursday May 18, 2023 @01:50PM (#35991604)
Thanks for the nice exchange. ;)
Re:Businesses are in for a mighty debt hangover by CapstanRoller on Thursday May 18, 2023 @07:00AM (#35986332)
>Programmers that never had to think about "what" to do are are just implementation machines

Do such programmers even exist today? I thought the Dot Com Crash wiped out any remnants of such jobs.

Every software development job now is a composite job of some sort, demanding skills and duties that were previously separated into other roles. This trend of condensing/combining roles applies to non-tech industries as well.

Specialization is still demanded, too, but the predicted future of hyper-specialization where every professional exists in a nanoscopic niche never materialized. We instead got multi-specialization due to an ever-shifting and highly unreliable labor environment.

This is why the job title of "GPT Prompt Engineer" is a joke, and will never actually exist.