|
I dare you to convert that to VB.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
It looks like you have some broad butts in your code.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
|
Readability is partially a matter of taste I guess, but I think if the onFinalized 's weren't inlined, the three remaining blocks wouldn't be as intimidating anymore and you would probably not need any comments at all.
modified 13-Sep-18 21:01pm.
|
|
|
|
|
And you are proud of it?
You aren't an engineer, you are a nerd.
|
|
|
|
|
I'm sorry Marc, but... ew.
Based on this code fragment, however, you may have finally disproved the truism about death and taxes. Since you wrote this, you can never die because they'll need you to stay around to maintain it.
Software Zen: delete this;
|
|
|
|
|
Now, THAT would NOT pass a code review! Comments should reveal what the code cannot. In this case, almost every single comment is clearly represented in the code.
What is missing is WHY this was necessary, and any limitations thereof. (eg, it cannot load old tax codes)
|
|
|
|
|
I use Visual Studio 2012 C#. I would like to create an application controlling the mouse cursor on the screen. I would like to set the coordinates of the mouse cursor on the screen and then to click with the mouse over the desired coordinates. I would like to set keys combination without using the keyboard and then to go to these coordinates automatically with the mouse cursor. I need information about the functions or properties for click events of the mouse cursor without using the mouse. Could you please help with any tutorial or example, please?
|
|
|
|
|
You could always try www.google.com[^]. You could also read again the text at the top of this page.
|
|
|
|
|
Member 12268183 wrote: Could you please help with any tutorial or example, please? Welcome - The complete C# tutorial[^]
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Thank you for the answer. I need only the functions related with the mouse cursor control not the whole training C# course.
Regards
|
|
|
|
|
Aw, I think you do.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Oh good, a non-VS2010 user ...
Can you tell me whether VS2012 is 64-bit?
|
|
|
|
|
VS2012 is definitely not 64 bit. Nor are VS2015 or VS2017.
The Visual Studio PM just said that VS2019 won't be 64 bit, either.
Maybe VS2048 will finally be 64 bit, though.
|
|
|
|
|
10-4 good buddy ... 2048; works for me.
|
|
|
|
|
Has MS made any thoughts on when/if a 64 bit version might happen more recently than a half dozenish years ago?
At the time the VS PMs reason for not doing it was that it wouldn't actually help scaling to larger solutions much because hitting the 4GB limit was always due to an algorithm/datastructure that was O(n^2) or worse, meaning that a 64 bit version would only let things get a tiny bit bigger before hitting the wall again, and that finding the performance/memory bottlenecks and rewriting them to be O(n) or O(n log n) would have much bigger returns than exhaustively reviewing/fixing the entire codebase to make sure everything was 64bit pointer safe. At the same time he did say that any module being worked on was being made 64bit safe, with the intent of gradually reducing the size of the remaining 64 bit conversion until doing so was justifiable in terms of the amount of work it'd require (vs spending the labor on other features local optimizations).
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
A Visual Studio PM was replying to comments in the blog post talking about VS2019.
He said that the consider the pros and cons of going 64 bit before each release, and theyève decided not to do it for VS2019.
I know that's not exactly a thought from MS on when 64 bit Visual Studio might happen. But it's at least a thought from MS on when it won't happen.
|
|
|
|
|
Thanks for that. I read the blog but didn't slum into the comments to see if there was anything interesting posted.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
|
No it isn't.
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
|
Mention "goto" to many programmers and they'll say, "Never use them, they lead to spaghetti code." It's a conditioned response. It seems to be a definition - "Dad, what's for dinner?" - "We're having goto ." - "Again?". Ask them to explain why it is so bad, and you'll likely get a blank stare, or they just chant "spaghetti, spaghetti, …" Of course, a misused goto can lead to spaghetti code, but a (misused) [any reserved word ] can lead to [some bad thing ]. Have we developed an irrational fear of goto born out of ancient coding dogma? Or is goto inherently and absolutely evil?
Update: As suggested by englebart, I'm adding why I asked this question.
It came out of a recent discussion. I was reviewing some code someone showed me (they didn't write it) that had a goto in it. He said the code was Spaghetti Code. When I asked why, he said because it had a goto . I asked why that made it spaghetti, and all he could come up with was that he was taught that. I asked about a few other "programming truths", and had much the same response. This is good, that is bad, but I don't really know why. I started thinking about how for some things, aspects of programming have become more faith than science.
modified 8-Jun-18 8:46am.
|
|
|
|
|
It creates functions which are strictly monolithic. It's not bad but it create impediments in further expansions or refactorizations of the function that uses it.
Goto to code outside the function containing it is problematic for the compilers, breaks modularity in C code as much as global variables do, and is completely undoable in OOP due to context changes.
All in all it may be a good solution but ultimately not worth the delayed troubles if not under very constrained circumstances.
GCS d-- s-/++ a- C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
I would say your examples are good examples of misuse, and not problems with goto itself. I don't use goto myself, except in rare cases to short-circuit a function.
|
|
|
|
|
That's a nice spot to use goto, I have used it twice in my life precisely for that: later I ended up removing them due to a refactor that improved every aspect of those functions (performance, readability, debuggability).
That said, I don't discard it out of hand as it is a powerful tool. As TNCaver said "You think goto is evil: try writing Assembly programs without JMP" (it has been in my signature for years... and I do also write Assembly code so it was really appropriate).
GCS d-- s-/++ a- C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|