I declare copypasta and design patterns, save for very rare exceptions, are sign of a sucky programmer or a sucky non-functional language at work. Programmer editors should have an option to produce a warning when you paste more than two lines or 80 non-whitespace characters, telling you that you are doing something wrong.
When working with a decent language, and by decent I mean anything that allows you to barely work with dynamic functions, so anything from PHP counts, I can hardly think of a situation where you'd need to copypasta your code, let alone use a professional enterprise best-practices design pattern.
Name:
Anonymous2007-01-12 11:28
>>1
Also, the Ctrl+C "Copy" command should be renamed to "Create Closure", where it frames whatever you select into a nested function in a syntax dependent of the extension of your file for convenience (you can then add parameters if you need so). So if you feel you need to use some code twice, you create closure and call instead of copypasting.
It's the programmers job to make sure this doesn't happen, just beat the shit out of each coworker that does it until they get the point.
Name:
Anonymous2007-01-12 12:58
>>1
How does this work for GUI development? Is it reasonable, if you want two similar frames, NOT to copypasta the code, but instead try to create both frames with the same code?
(For instance one about page with a close button, and one information page with a yes and a no button. Basically the same setup, lots of copypastad code)
>>5
I like embedding GUI code in my other code. Because reading from external definitions is too much of a hassle.
Name:
Anonymous2007-01-19 4:43
obviously someone hasn't had the issues of object factories + and class loaders loading unknown classes at runtime if no likey likey design patterns
wtfe
Name:
Anonymous2007-01-19 5:03
>>7
I don't have the issues of object factories + class loaders loading unknown classes at runtime because I don't use a sucky language where this would be an issue. So just fire, post a case where you think you need a best-practices design pattern, and I'll tell you why you don't.
>>11
Design patterns are 20 years old and I don't think Java existed back then. And BTW, design patterns have nothing in common with "objects", try to read books instead of burning them, fucking nazi.
Name:
Anonymous2007-01-19 14:32
to start with, if you write something with a plugin architecture, that means you are providing modularity and loose coupling, and has nothing to do with a language being sucky. that has to do with providing a well defined api to extend your prog.
i also dont know if youve gotten into MVC and front controller, but as a design pattern, it makes things damn easy to deal with and is good for rapid prototyping, i.e. zend framework. by using delegation, and it solves the problem, elegantly, of a complex system where control is distributed among its views. you can also take that front controller, and subject it to reuse, which saves you time.
it also centralizes presentation logic of a system, which reduces duplication and the likelihood of bugs. i don't see why you are so against design patterns.
Name:
Anonymous2007-01-19 14:47
He's just bitter because he only learned about it recently and realized that he had been wasting his time.
Name:
Anonymous2007-01-19 18:51
He's just bitter because he only learned about it recently and realized that he had been wasting his time.
copypasta sallad
Name:
Anonymous2007-01-19 21:07
>>14
Not really, it's more like: I've been hearing people circle-jerk about design patterns for some time, and always wondered what was the big deal with them. Then I realized copypasta is bad, because anything you copypasta means you have to keep track of where you copypasted when you need to modify copypasted code, and I realized a good language always has ways to almost completely avoid copypasta. Then I went back to design pattern people and realized they are fucking morons for copypasting, and for circle-jerking to stuff they don't completely comprehend and couldn't come up with, because today's best-practices programming is about the "glue", i.e. a sub-par graduated programmer with no experience trying to figure out how to make Java shit work together in that shitty language.
Name:
Anonymous2007-01-19 22:13
many design patterns ELIMINATE copypasta, not encourage it. duh
As anonymous has said above, Design Patterns are meant to avoid duplication of code. They aren't the holy grail of programming, and people do use the buzzword far too often. A good programmer uses design patterns intuitively. The pattern names just give a common language.
All buzzword wielding circle-jerkers are sucky. Thats just their nature. Whether its Web 2.0, Design Patterns, AJAX or Ruby they are currently jerking to - its not really the things fault, its just the people.
Okay, I looked it up... and it looks like something programmers do in their minds by habit anyway, only instead formalized into business-speak so the tie-dummies can understand what the coders are doing/talking about.
Name:
Anonymous2007-01-20 6:42
its like a selection of common approaches to recurring issues with software development.they're not set in stone, so you're not emulating them, but they are useful. they're not just cookbook recipes either, but are a way to perceive common issues and at the same time, reduce complexity, reduce coupling, and reduce duplication of code, and reduce copypasta.
Name:
Anonymous2007-01-20 13:07
I've had to copypasta code once (ONCE) when I had to implement something deeply mathematically complex that I couldn't understand or figure out from shoddily-written tutorials on the matter. Is copypasta code a problem if the code is public domain and you give credit to the original coder anyway?
Name:
Anonymous2007-01-20 20:28
>>21
Problem is, they don't. If you understand design patterns, you don't ever need to name them, as when you're talking to somebody who equally understands, you just say "yeah, we do that shit" and he'll understand what you mean, and if you talk to somebody who doesn't understand what needs to be done, he shouldn't be doing the job anyways, as he's a buzzword loser. Even if he gets to learn the buzzword for the "design pattern" you wanted to use, he'll fail it, because he has been given something which he does not understand and couldn't have created himself.
Name:
Anonymous2007-01-20 20:30
>>22
How the fuck will you reduce copypasta with copypasta from a book? And I wouldn't trust that shit. I can trust library classes and functions, but I ain't trusting "snippets" (i.e. inline copypasta, not a proper function or class) I don't thoroughly read.
>>23
In that case, it's justified. And using public domain code is more like using a library, i.e. not evil.
Name:
Anonymous2007-01-21 21:54
Sometimes when you're in a rush, copypasta is the best approach to getting stuff done.
Name:
Anonymous2007-01-21 22:51
>>25
You're missing the fucking point. design patterns are not copypasta, and if you think they are, you _completely_ misunderstand what they are, and why they exist.
Oh fuck. Frozen Void posting as Anonymous. This is more or less equivalent to flying scorpions.
Name:
Anonymous2009-03-06 6:41
Work cuz I hate java just as gracefull you just need something kind of random e g to use that chat interface to talk with each other Chosen completely at random This is likely performing a rather crude way to connect to the screen Question what do I do not agree you should not ignore.