/script>
[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Design Patterns

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 28
Thread images: 3

File: designPatterns.jpg (93KB, 520x648px) Image search: [Google]
designPatterns.jpg
93KB, 520x648px
Do you have your goto place when learning design pattrens?

Currently reading:
Head First Design Patterns
https://www.tutorialspoint.com/design_pattern/strategy_pattern.htm

and watching:
https://www.youtube.com/watch?v=v9ejT8FO-7I&t=149s

Also heard good things about:
Design Patterns: Elements of Reusable Object-Oriented Software
>>
>>60211060
I'm a neurotypical, no.
>>
OO is a mistake, learning design patterns for the sake of it is getting it all backwards even for good intent.

You should not rape your code to accommodate factory factories, embrace kiss, no need to be buzzword compliant.

Sorry for the spoiler, I saved you a couple of months of dicking around if you can recognize good advice and not want to commit all mistakes on your own.
>>
>>60211060
Just finished my Software Design course in college. It was entirely based around that book.
Definitely an interesting topic, it was pretty hard though.
I feel like it'll take a decent amount of time and experience to know what pattern to use in a given situation.
>>
>>60213006
This. Design patterns are admission that your language is not expressive enough.

Sometimes they are useful so you should know the important ones (like composition, dependency injection, visitor...) but weight using them against the boilerplate and loss of readability.
>>
>>60213006
why do you think it's a mistake?
>>
File: RR.jpg (36KB, 526x473px) Image search: [Google]
RR.jpg
36KB, 526x473px
>MFW using a flyweight instead of a visitor factory
>>
>>60213106
Their most useful property comes from providing a common language in which you can explain to receptive individuals why you should not use them

>GoF
>>
>>60213147
because bloat and complexity is all that comes out of it, but that is no wonder.
If you ever been to a Java interview you would now people can't agree on what does it mean for starters. Even Alan Kay has no idea: Maybe something to do with messaging. No wonder you can't build solid stuff on hot air.
>>
>>60213298
do you think it's useless?
>>
>>60213384
from a coding point? yes

earning a paycheck? no, they are useful for interviews if you don't want to polish your algorithms/data structures further. Still, in that aspect adding more JS/node, devops to your resume is more useful
>>
>>60213106
Hmm as a undergrad with a few internships, I don't know if I follow. Most production code I've seen is much more readable with design patterns applied. Could you provide an example where design patterns make code unreadable?
>>
>>60213666
why?
>>
>>60213006
this
>>
>>60211060
>goto place

Place:
Printf('GOTO is the most abused instruction in history yet its proper use the only true sign of competence'. "\n");
>>
>>60211060
if you need design patterns, your language is too weak
>>
>>60211060
You don't need design patterns.
Most so called design patterns are the result of a poorly designed language which doesn't have the right features.
You then have to come up with these engineered designs to express a simple pattern.
The only reason design patterns are popular is so that stupid pajeets can try contributing in a project without breaking everything.

Take a look at this for further insights:
http://www.norvig.com/design-patterns/
>>
File: 1476632507641.gif (112KB, 280x280px) Image search: [Google]
1476632507641.gif
112KB, 280x280px
>mfw working on software with 100K active users
>mfw I don't give a shit about meme design patterns, planning or unit testing
>>
>>60213006
t. expert fizzbuzz C programmer
>>
>>60217545
this
git init then code away
>>
>>60217545
yeah fuck unit testing amirite guise haha who cares if edge cases break your code and get your servers owned amirite haha
>>
>>60217975
kek
Retards so used to the big black unit testing cock that they can't imagine life without it.
>>
>>60218004
it's okay if you don't unit test your code, just don't get butthurt when pyotr builds a fuzzer to test your software for you :^)
>>
>>60213006
>>60213106
>>60213164
>>60213298
>>60216582
>>60217509

You guys seem to always advocate for simplicity and bloatless software but when it comes to design patterns then suddenly you want more features in your language?

Java is notably featureless and that makes it so design patterns are almost essential. What would you rather have? macros so you don't need to implement de interpreter pattern? metaclasses so you don't need factories?

What if you need to use OOP? I don't think you guys would argue about the fact that in some fields it's easier and more natural to work with oop so suggesting C or Haskell is out of the question.

What would you suggest so you dont need design patterns in your OOP language? Python? C++? Is it worth it to have a bloated piece of shit for a language so you guys don't have to memorize or even look for how to implement an abstract factory?
>>
>>60218051
reminder that you can write correct code without any testing, and shit code that no amount of testing can help

testing has its places, but when building a new product ttm usually trumps everything

>no, tdd does not make you move quicker
>>
>>60218307
>more features
We don't want more features, we want the right ones.
>Java is notably featureless
maybe it was in version 1
>What if you need to use OOP?
Design patterns aren't what oop is about. Smalltalk or Self are examples for object oriented languages that work really well even without using design patterns.
>What would you suggest so you dont need design patterns in your OOP language?
Prototype based object orientation instead of class-based. First class functions instead of wrapper objects.

And if you really do need to use a design pattern, then that's fine with me.
I'd just be careful not to overuse them. And don't think you'll become a great programmer if you're just great at applying design patterns.
>>
>>60218307
http://harmful.cat-v.org/software/c++/linus
>>
>>60218577

why do Linus is a fucking dick? I love him!
Thread posts: 28
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.