In addition to the tips above my contributions are:
Use an IDE, it will often understand the problem much before you and help you with everything you need to do as a programmer.
Learn to use a debugger. Forget console.log, forget puts, forget echo, fire up that debugger and see exactly what is going on.
Almost all programming environments support a real-time debugger, allowing you to step through every line of code in your application while monitoring the state. Way too few programmers know these tools exist, know how to use them, and then use them to find out what your program is actually doing and where it actually fails.
Thanks Duke! To me, using an IDE was a personal preference, till I started working on projects which deal with large scale code. I cannot emphasize this more, that using an IDE has a lot of advantage over a pure editor. Simply stated, makes life easier for developers and saves them from many pitfalls, and improves overall productivity.
I really have to agree on both points, however I have the opinion that one should not throw print functions entirely out of the window. The print function can be extremely useful when for instance one is debugging a multi threaded program. It can reveal the sequence of actions that happened, and the programmer can respond accordingly to that.
A debugger in the above case can sometimes miss this sequence, and one definitely misses the overview of this sequence with a debugger.
In my opinion, this is a "pick the right tool for the job" case. A debugger is extremely helpful, but is not everything.
Johannes is a Backend and Systems Engineer by trade and works at Microsoft since 2019 to help game studios across the globe implement Online Game Services on Azure.
It should not. However, I do see there are languages and environments, where setting up a debugger may be hard.
But most people are application developers and don't do embedded etc. Those folks should really only use a debugger if possible (yeah, parallel programming indeed is a prob here) because usually it's even faster than printing, gives a lot more info, you can usually change stuff in the process and you don't forget print statements which may find their way into a public release.
I am working mostly with .NET Core and starting to debug is a matter of pressing one single keyboard key. Writing a debug print statement is actually more effort to me.
"Famous quote" doesn't mean it's right. I know a lot of famous bullshit quotes.
And yes, of course you need a working brain to do effective debugging, but a debugger sure helps a lot. Especially when your application requires recompilation to add your print statements just hooking in the debugger and seeing what's going on is often a LOT faster.
Comment marked as low quality/non-constructive by the community. View Code of Conduct
I don't agree. I'm actually so much lazy I rarely use the debugger. That gives me a whole lot more time to work on other things instead. If you spend too much time on it you are not productive. You are just messing about.
And one more thing. This is not a bullshit quote from the author of C as he definitely knows more about programming wisdom than anybody here combined.
Comment marked as low quality/non-constructive by the community. View Code of Conduct
I really don't know what you do when you mess about with debuggers, I use the debugger to find out what's wrong with my application instead of messing about with print and guessing, fix the issue, and move on
That's the fallacy there. I don't appeal. I respect. Which you don't. No one really likes a wannabe smartass. Plus I have much experience in Software Development to think of my own and to have a pragmatic view of things that work and things that not. I suggest you try that in your life and maybe you will get more free time and less time to be cocky.
Comment marked as low quality/non-constructive by the community. View Code of Conduct
Yo! I'm Adam. I'm a web developer based in London, UK and I'm open for messages and questions about work or code or anything really.
P.s I'm the one with the beard in my profile pic ✌🏻🐵
He made a mistake with citation. Other than that mistake he was not the one who was rude. He didn't claim that the other guy was offering 'bullshit' and he didn't resort to being rude until Janne was a douche about it. Janne is the dickhead in this situation. Not Theofanis for making a mistake on who said something.
Edit: Just realised how old this is! Apologies for piping up but my point still stands in my opinion so I'ma leave it thurrr
Comment marked as low quality/non-constructive by the community. View Code of Conduct
Again, whoever made the statement is irrelevant. Appeal to authority is a shit argument as well. Rudeness also matters exactly none at all to the correctness of the statement.
Comment marked as low quality/non-constructive by the community. View Code of Conduct
Yo! I'm Adam. I'm a web developer based in London, UK and I'm open for messages and questions about work or code or anything really.
P.s I'm the one with the beard in my profile pic ✌🏻🐵
Well it does hold relevance when that was the turning point of this particular conversation turning sour. I didn't say anything about appealing to authority. Your last statement was the only thing you said that is true. You can be correct and not a cunt simultaneously though.
Comment marked as low quality/non-constructive by the community. View Code of Conduct
Sure seems to me that you are the cunt and dickhead in this conversation if that's all you've come here to do, to fling random insults without making a point.
Comment marked as low quality/non-constructive by the community. View Code of Conduct
Yo! I'm Adam. I'm a web developer based in London, UK and I'm open for messages and questions about work or code or anything really.
P.s I'm the one with the beard in my profile pic ✌🏻🐵
In addition to the tips above my contributions are:
Almost all programming environments support a real-time debugger, allowing you to step through every line of code in your application while monitoring the state. Way too few programmers know these tools exist, know how to use them, and then use them to find out what your program is actually doing and where it actually fails.
Thanks Duke! To me, using an IDE was a personal preference, till I started working on projects which deal with large scale code. I cannot emphasize this more, that using an IDE has a lot of advantage over a pure editor. Simply stated, makes life easier for developers and saves them from many pitfalls, and improves overall productivity.
This. I can't live without my debugger!
I really have to agree on both points, however I have the opinion that one should not throw print functions entirely out of the window. The print function can be extremely useful when for instance one is debugging a multi threaded program. It can reveal the sequence of actions that happened, and the programmer can respond accordingly to that.
A debugger in the above case can sometimes miss this sequence, and one definitely misses the overview of this sequence with a debugger.
In my opinion, this is a "pick the right tool for the job" case. A debugger is extremely helpful, but is not everything.
Debugging actually takes a long time. There is a famous quote.
"The most effective debugging tool is still careful thought, coupled with judiciously placed print statements." - Brian W. Kernighan
I find that more to the point.
It should not. However, I do see there are languages and environments, where setting up a debugger may be hard.
But most people are application developers and don't do embedded etc. Those folks should really only use a debugger if possible (yeah, parallel programming indeed is a prob here) because usually it's even faster than printing, gives a lot more info, you can usually change stuff in the process and you don't forget print statements which may find their way into a public release.
I am working mostly with .NET Core and starting to debug is a matter of pressing one single keyboard key. Writing a debug print statement is actually more effort to me.
Kernighan said that in 1979. I don't know if you've noticed, but software and tools have evolved a little bit since then.
"Famous quote" doesn't mean it's right. I know a lot of famous bullshit quotes.
And yes, of course you need a working brain to do effective debugging, but a debugger sure helps a lot. Especially when your application requires recompilation to add your print statements just hooking in the debugger and seeing what's going on is often a LOT faster.
I don't agree. I'm actually so much lazy I rarely use the debugger. That gives me a whole lot more time to work on other things instead. If you spend too much time on it you are not productive. You are just messing about.
And one more thing. This is not a
bullshit quote
from the author of C as he definitely knows more about programming wisdom than anybody here combined.I really don't know what you do when you mess about with debuggers, I use the debugger to find out what's wrong with my application instead of messing about with print and guessing, fix the issue, and move on
Good job, you almost made a good argument there: yourlogicalfallacyis.com/appeal-to...
That's the fallacy there. I don't appeal. I respect. Which you don't. No one really likes a wannabe smartass. Plus I have much experience in Software Development to think of my own and to have a pragmatic view of things that work and things that not. I suggest you try that in your life and maybe you will get more free time and less time to be cocky.
Your whole comment is a big "lol". Thanks for the boring conversation, I'm done wasting my time on you.
Thank you for verifying my assumptions to the world. Go on debug something now.
He made a mistake with citation. Other than that mistake he was not the one who was rude. He didn't claim that the other guy was offering 'bullshit' and he didn't resort to being rude until Janne was a douche about it. Janne is the dickhead in this situation. Not Theofanis for making a mistake on who said something.
Edit: Just realised how old this is! Apologies for piping up but my point still stands in my opinion so I'ma leave it thurrr
Again, whoever made the statement is irrelevant. Appeal to authority is a shit argument as well. Rudeness also matters exactly none at all to the correctness of the statement.
Well it does hold relevance when that was the turning point of this particular conversation turning sour. I didn't say anything about appealing to authority. Your last statement was the only thing you said that is true. You can be correct and not a cunt simultaneously though.
Sure seems to me that you are the cunt and dickhead in this conversation if that's all you've come here to do, to fling random insults without making a point.
I did make a point. You can be correct without being a cunt. Something you clearly struggle with.