Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
byby
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
byby
3y ago
No. This is false. Even senior engineers can have this problem. It's not a differentiator for success. This is counterintuitive but actually there is raw science to back the opposite fact up. I'm not joking. The more delusional yo
2.
▲
by
byby
3y ago
Yeah but to keep on topic you suggested that this sort of thing was happening in the thread. I disagree, it's not.
3.
▲
by
byby
3y ago
>You've written 3 functions instead off one. 3 functions is better. Think about it. Do people write all their stuff in one big function? No. Better to compose higher level functions with smaller ones rather then write one big monoli
4.
▲
by
byby
3y ago
This is the function I gave chatGPT: ME: def (x: int): for i in range(x): print(i) It takes an int. Are you trolling now or did you get mixed up with something else?
5.
▲
by
byby
3y ago
Alright fine, I can concede to this. ChatGPT should not have given me the best alternative but it should have given me the exact technically correct answer. You're right.
6.
▲
by
byby
3y ago
I've been writing them for over 20. Doesn't matter. What matters is factual correctness. See here what a unit test is versus integration test: https://www.testim.io/blog/unit-test-vs-integration-test/ An
7.
▲
by
byby
3y ago
> I'm sorry, I clearly haven't explained myself well as otherwise you would not have wasted a huge amount of text tying yourself in knots based clearly on a mistaken apprehension of what I was saying. No need to apologize. This
8.
▲
by
byby
3y ago
>Output formatting is still a type of transformation! I'll quote part of my reply (which you missed): (Btw making print formatting unit testable means segregating the formatting from the print. Produce the string first, test th
9.
▲
by
byby
3y ago
It is. There is literally zero other way to make that function unit testable. What are you gonna compare that data with in a test if it's thrown into IO? By definition all unit testable functions have to return data that can be asserte
10.
▲
by
byby
3y ago
You have to change the semantics of the function to make it unit testable. Literally tell me how else can you test that function with a unit test? By definition a unit test can only test functions that return data. So there's no other
11.
▲
by
byby
3y ago
>That would be fine if the core thing needing unit testing was the data generation/ transformation logic, but just as often as not it's the output formatting too. Output formatting touches io. In this case it is no longer a uni
12.
▲
by
byby
3y ago
Bro, dependency injection and mocking is the same thing as segregating your function from IO. Your replacing io calls to stdout with io calls to something else. But that doesn't make your code unit testable. The function is still touch
13.
▲
by
byby
3y ago
Yeah those crazies are far and few in between and none of them are on this thread. Throwing out religious accusations is going too far.
14.
▲
by
byby
3y ago
I think you don't understand what unit testability means. It means removing IO and side effects from your code. How the hell do I test a print function? I take the print function and match it with what? It has no output so how can I te
15.
▲
by
byby
3y ago
Yeah. Why did you get pedantic, rude and heated about the code quality for my toy example? It's my example sure, but it's your reaction to it that makes no sense. plus: that's not true.
16.
▲
by
byby
3y ago
Sort of. There's an input variable that adjusts the "creativity" of the LLM. If you adjust the variable the answers become more and more "creative" approaching the point where it can challenge you. But of course thi
17.
▲
by
byby
3y ago
This is a good answer. You don't have the bias of years of programming experience or training. You don't have your identity tied to the job. If AI helps you, you'll emphasize on the overall benefit rather then nitpick at the
18.
▲
by
byby
3y ago
It's not a stance. I'm stating a fact of reality. Huge difference. I didn't say don't bother extending it's capabilities either. You're just projecting that from your imagination. An hallucination so to speak n
19.
▲
by
byby
3y ago
This is off topic. Clearly we all know the LLM is flawed. We are just talking about it's capabilities in debugging. Why does it always get side tracked into a comparison on how useful it is compared to human capability? Everyone alread
20.
▲
by
byby
3y ago
So I said it's like 50 percent of the way there implying that it gets things right at a rate of 50 percent. That's a fuzzy estimation as well, obviously so don't get pedantic on me with that number. When you ask for large out
21.
▲
by
byby
3y ago
I mean. I said 50 percent of the way there right? So your example here is inline with what I said. It's not perfect, but it's halfway there.
22.
▲
by
byby
3y ago
>Maybe not word for word, but similar enough Find one. Dated before 2021. In fact, according to the theory that it's statistical parroting there should be multiple examples of for loops printing out numbers being converted to unit t
23.
▲
by
byby
3y ago
Probably not then. But I just post whatever I want and I'm already in the top 10 percent. And I'm not an avid user either. I just ask a bunch of questions. I've had a few flamed and closed but that's just 1 or 2 out of I
24.
▲
by
byby
3y ago
He's just talking _. Clearly nobody here on both sides are having religious fervor around ai. One side is saying we don't understand LLMs completely and the other side is saying we absolutely do understand it's all statistica
25.
▲
by
byby
3y ago
I simply asked it to make it unit testable and it did the task 100 percent. I'm not sure where your side track is coming from. Who in their right mind would ever check in code that prints a range of numbers from 0 to x? The example was
26.
▲
by
byby
3y ago
The code is not garbage, it's just your highfalutin python opinion makes it so you only ever use list comprehensions or return generators. For loops in python that return non lazy evaluated lists are fine. Python was never suppose to b
27.
▲
by
byby
3y ago
If you read my post I said 50 percent of the way there. So that means a 10 line bash script at best would have 5 lines of bugs. But the AI is actually better then that. You've just increased the bar.
28.
▲
by
byby
3y ago
>Well I take myself to be an expert in this area, and I think it's fairly obvious how they work. Many of these so-called "Experts" are sitting on the boards of commercial companies with vested interests in presenting this
29.
▲
by
byby
3y ago
> fear of being reprimanded. Don't worry about this. You can get over the fear. I'm in the top 10% of stackoverflow users in terms of points and it's all because my stupidest questions from decades back gathered thousands
30.
▲
by
byby
3y ago
> I agree. LLMs are very impressive, but it isn't helpful to think of them of magic. LLMs are a great tool to explore and remix the body of human knowledge on the internet (limited to what it has been trained on). Of course you shou
More ›