11
crisz
7y

So, today I wanted to program a bit and, after reading the last chapter, I want to see what I able to do.
I run my last Linux distro, I open sublime and I start typing code. I finish, I build. 0 warning, 0 errors. Nice! I execute the code: error.
I watch and I struggle on the code for hours, I search on Google, I search on StackOverflow, but after 1 hour I notice I'm looking for a needle in a haystack. So I search instead for a way to produce a better error. I found it, I'm very happy. Let's try what the error actually is:
Error: success
Ok....
Ok...... Well, maybe.... Uhm......
Ok, I won't give up. I search for a tutorial. Found.
The code is almost the mine, it's actually a usual snippet, nothing new. I compare my code with the code in the example/tutorial.
First line, is the same.
First 10 lines, are the same.
First 30 lines, are the same.
I build and execute the example: it works.
I build and execute my code: still doesn't work.

I won't give up, I said it. I won't give up.

I wonder if there's a tool like git diff, so I can see what the differences are, maybe I've no good eyes.
I search, first Google result, "diff"
diff myCode.c example.c
"the files are not identical"

...thank you
I search for a better command
diff -y myCode.c example.c
"the files are not identical"

I search for a still better command
Found. StackOverflow stroke again.
sdiff myCode.c example.c
"the files are not identical"

.....
....

.....

I gave up.

Ps. I've 10 years of experience in programming

Comments
  • 0
    Winmerge helps me a lot comparing and merging pairs of files. Maybe you just need to sleep 😊
  • 0
    Encoding? Line ending? Weird blank space?
  • 0
    Why not use git diff?
  • 0
    @spaghetti I wanted a tool ready to use. I was obviously too much tired 😂😂
Add Comment