|
I completely agree with you, whenever I find myself using Copy and Paste I refactor my code.
"To alcohol! The cause of, and solution to, all of life's problems" - Homer Simpson
|
|
|
|
|
Ctrl, X, C, V...the most popular keys on my keyboard! I usually keep on or two Notepad windows available for scratch areas or to remove formatting.
"Go forth into the source" - Neal Morse
|
|
|
|
|
Mine to. I even bought a mouse with 2 extra buttons which are assigned to copy & paste.
|
|
|
|
|
Then call me a heretic. Copy/paste isn't so bad if you pay attention. I keep a few snippets/scripts at the ready. They tend to be special cases that don't lend themselves well to the "Correct Way"™... and (by design) they never compile. That keeps me from being stupid once the caffeine runs low.
|
|
|
|
|
|
Slacker007 wrote: It is even more devilish if you copy and paste your own code. It's down right perverted, I tell you.
Depends on the context.
Reuse via the library idiom requires planning, requirements, dependency resolution and education. The last by itself can often preclude usage both in small and larger enterprises.
Even a simple class usage can be complicated by differing requirements. I would much rather see similar code in two places versus code in one place with is complicated by a number of conditionals in that code base which exist solely to deal with requirements for different usage (which is something that I have seen.)
That latter alternative can lead to very fragile code. I continue to see well intentioned code created as real libraries based on a single usage which has no better chance of succeeding than implementing a base class based on a single child class.
People can't even understand usage requirements for libraries that are used in multiple places as they will attempt to push application specific functionality into such libraries because it is related (or even just convenient.)
|
|
|
|
|
I mostly use it for copying long variable names, but even that is rarely necessary thanks to great tools like VisualAssist.
When copying entire lines of code it's usually no more than 1-2 lines, i. e. not enough to trouble myself with extracting a separate function.
I do see the effects of 'evil' copying code though: parts of our application date back to the times of the structured programming paradigm, and there are lots of functions that are 95% identical to others, and it is a real pain when I need to change something within one of those, because it's often hard to locate the 'evil twins'.
|
|
|
|
|
I was checking a thread in stack-overflow and compared my experience there with CP.
There you are not forced to be a member in order to be able to comment.
I dont know the policy behind logging constraint. There have been many times that my browser cache was empty and i was in CP. So i wanted to just download a library and give it a try. I had to first log into CP and then download it.
Guys behind the CP, especially Chris, Please make it a little easier!
Behzad
|
|
|
|
|
It used to be like that but, as far as I can recall, it was changed because people were abusing the system especially when commenting: nothing more frustrating than an anonymous comment lambasting or down-voting your pièce de résistance.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
What about downloads? I think it could be more easy to download codes without logging.
Behzad
modified 20-Dec-11 13:29pm.
|
|
|
|
|
Behzad Sedighzadeh wrote: What about downloads? I think it should be free.
It is free.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
I wouldn't let CG touch my Abacus!
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.
|
|
|
|
|
Behzad Sedighzadeh wrote: Guys behind the CP, especially Chris, Please make it a little easier!
What's difficult about logging in?
I thought that you have to log in to StackOverflow to vote, add comments etc.?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
I wouldn't let CG touch my Abacus!
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.
|
|
|
|
|
There is nothing! i can be a little easier!
Behzad
|
|
|
|
|
Although you are logged in as far as I know you have to have at least 50 points to comment.
|
|
|
|
|
Not sure that it is as many as 50, it's been so long that I cannot remember the exact figure, but whatever the figure is that makes it more difficult than here on CP so I really cannot see what the OP is complaining about.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
I wouldn't let CG touch my Abacus!
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.
|
|
|
|
|
For sure it is harder, personally it is harder to find what you need. I also dont understand why he is complaining. Check out the SO reputation[^] page as I said at least 50 points allows you to comment. which makes the life of a beginenr harder. if they ask a question and need to comment they stuck up because they dont have enough rep points..
|
|
|
|
|
One of the reason is Bots[^]
|
|
|
|
|
I've just been over to SO. You do have to log in to comment, and to vote. OK, technically you don't have to be a member of SO - you just need an OpenID, but I don't really see that as being much of a burden here. And once you've signed in, as long as you have your cookies enabled and click the little checkbox, CP doesn't require you to sign in again.
|
|
|
|
|
And another reason is we have to calculate the reputation points[^]. Example: For every downloads the author is getting points(for his great works).
|
|
|
|
|
thatraja wrote: Example: For every downloads the author is getting points(for his great works).
You don't need to have downloaders logged in to do that. To stop multiple downloads for the purposes of increasing rep points on the other hand........
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
I wouldn't let CG touch my Abacus!
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.
|
|
|
|
|
|
Believe me, sir, the intrinsic value of what this TCP community really stands for goes so much deeper than commenting, downloading and "browser cache" problems that it completely dwarves any reason one could possibly stubbornly drum up in order to not take the 5 minutes to follow the standard registration procedure.
Those of us who have been here for years for a reason are also registered members for a reason.
"... having only that moment finished a vigorous game of Wiff-Waff and eaten a tartiflet." - Henry Minute
"...who gives a tinker's cuss?" - Dalek Dave
"Let's face it, after Monday and Tuesday, even the calendar says WTF!" - gavindon
It's plain that they do not yet know what true fear really is. - JSOP 2011
|
|
|
|
|
There's also a marketing potential that can be used to identify your search patterns for example. I cannot think of a single company that when you are forced to register or logon will not use that information for its own purposes. Whether CodeProject benefits financially from this information I cannot say, but for every company that says they don't use your information for financial gain, there is another one that says they don't but does.
|
|
|
|
|
Because the business model DOES NOT WORK, it has been tried, CP and SO have both tuned the sites so they work for both a business model and a user experience.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
So after the multiple orgasm I had with the last batch, I made some more. And it is better.....
I mashed the dill up with the sugar and salt, so it was a paste. When put on the salmon the juice ran green, and I left it in the fridge for a week. Man, it is sooooooo nice. Just in time for Christmas breakfast, Smorrebrod, Danish open sandwiches with dark brown bread with various fish stuff on top, and cream cheese. Danish smorrebrod[^] Roughly translated into english as 'smear bread'
==============================
Nothing to say.
|
|
|
|