7 ms·
My favorite personal Fortran story: I was passing by a WAY SMARTER THAN I COULD EVER HOPE FOR guy who was pouring over a two inch Print-out of some scientific c
by zippyman55 4y ago
My favorite personal Fortran story: I was passing by a WAY SMARTER THAN I COULD EVER HOPE FOR guy who was pouring over a two inch Print-out of some scientific code. He had been trying to troubleshoot a problem. I guess a comma was in the 80th column, which I recall presents an error. In my passing by, I pointed out the error (one second) and I always had his respect after that.
- JoeAltmaier 4y agoI've had less success pointing out errors to people 'smarter' than me. One was stuck learning C because they knew just enough about scope to be dangerous. They'd declared 'i' globally and used it in every subroutine for looping. Which failed confusingly when they called one looping function inside a loop in another. No amount of insisting each function needed it's own 'i' would convince them. I left them to it.
- AnimalMuppet 4y agoIn college, I was writing something in Fortran, and I made a typo. I was trying to call the cosine routine, COS, and I overshot the "oh" key, and typed C0S. It took me two days to figure out why Fortran didn't know what cosine was.
- Koshkin 4y agoI don’t know how one cannot see the difference between the letter O and the digit 0
- AnimalMuppet 4y agoFirst, it was supposed to be a capital letter O, because Fortran. Second, this was about 1982, on a green-screen terminal with not a lot of resolution. And third, I was a naive 20-year-old without a lot of experience at what fat-fingering things can do, so I wasn't really looking for that.
- Koshkin 4y agoSure. All I mean is, since the time immemorial the zero, on computer peripherals, has been visually distinct from the letter O (which was done by crossing the zero or putting a dot inside it).
- AnimalMuppet 4y agoOh, it was visually distinct. Just not very much.
- Fellshard 4y agoNever underestimate the benefit of a fresh pair of eyes!
- busterarm 4y agoHah. Years back a person from a forum from my college (this is just barely pre-Facebook) who absolutely hated my guts sheepishly asked for my help to look over some job related code of his that was giving him errors. He came to me because everyone said "I was good with web stuff". Within about 5 seconds I spotted he had forgotten a semi-colon from the end of an escape character and it was causing him all hell with rendering. I pointed it out right away but still looked over the rest to find errors and didn't find anything. He had a hard time believing it but trusted me enough to try it and alas I was correct. From then on he treated me much better.
- WalterBright 4y agoA far better C programmer than I came by once sure he'd found a compiler bug. He had spent all day wondering why his loop only executed once: for (i = 0; i < 10; ++i); func(); In one second I pointed out the extra ;. This does not remotely mean he was a bad programmer and I was a great one. It's just exactly the kind of thing where we see what we expect to see, not what is there. I make misstakes like that, too. But this experience is why D does not allow a solitary ; to represent an empty line. Modern C compilers spit out a warning for it, but geez, just make it an error already and eliminate the scourge of those bugs. I've seen other variations like: if (condition); doThis();
- yjftsjthsd-h 4y agoProbably compilers allow that kind of for loop because you can construct a valid for loop that does actual work inside what should be the condition logic. And sure, that's horrifying and awful and people shouldn't do it, but the spec says that it's valid so the compiler has to allow it.
- grogenaut 4y agoA friend of mine was getting a masters in computer science where they teach you all of the cs in the first class he is coming to business school and have a while loop with a semicolon at the end he had spent six and a half hours trying to figure out why it didn't work. I spent 2 minutes reading the code couldn't figure it out open up and debugger and then obviously saw it when the doctor wouldn't go past a while. It's kind of like when I spent 7 hours figuring out on my computer wouldn't start and then we saw that it was set to 2:20 instead of 112
- Decabytes 4y agoHi Walter, I've been learning to program in C, and I enjoy it. The problem is that while I wish to write C, I do want some additional conveniences afforded by other languages. I think the traditional way people go about this is using C++ kind of like a C+. There are also people who use Zig. I'm not a fan of Zig, and I don't like how C++ doesn't always behave like C even when you write in the C style. How does BetterC stack up to Zig and C++ in this situation? Does it allow me to write plain C but with some of the conveniences of D?