Crell, to random
@Crell@phpc.social avatar

"It's a DTO so it shouldn't have methods, just data" is an excellent way to end up with procedural spaghetti with a class keyword floating around.

It certainly won't get you a good #OOP codebase, that's for sure.

Crell, to random
@Crell@phpc.social avatar

When people complain about being just an over-engineered mess of indirection, they don't mean OOP. Just the Java ecosystem.

sarah, to php
@sarah@phpc.social avatar

Check out my free book, Mastering Object-Oriented PHP, available at https://masteringobjectorientedphp.com

sarah, to php
@sarah@phpc.social avatar

Have you gotten a FREE copy of my book, Mastering Object-Oriented PHP, yet? You can get yours at https://masteringobjectorientedphp.com

djumaka, to php
@djumaka@phpc.social avatar

Guys I need some helping hand. I need some good reading (book/article) on the proper way of writing OOP. I gave a project where we use classes, but they are more used as a package if functions then working like objects. Like a class of only statics, passing around IDs not the real objects of data (this sending SRP down the drain), arrays, generally functional programming with extra steps. I'd fancy even a discussion as I want to slowly explain all that to my teammates
TIA

Crell, to Software
@Crell@phpc.social avatar

Always remember the P7 rule:

Proper Prior Planning Prevents Piss Poor Performance.

sarah, to php
@sarah@phpc.social avatar

I strongly prefer composition over inheritance.

If you can compose objects of other objects and use interfaces over concretions, you make it much easier to modify your app in future.

Ultimately the time you take to design your app will be spent now (in design) or later (in maintenance). Since most apps spend most of their life in maintenance, don’t make the mistake of saving time now and spending it later.

jakub_zalas, to random
@jakub_zalas@mastodon.social avatar

“duplication is far cheaper than the wrong abstraction”

— Sandi Metz in “All the little things” at RailsConf 2014

The quote is often put out of context to support the idea it’s always better to postpone the abstraction until there’s enough duplication. It’s used as an excuse to keep duplication for some arbitrary amount of time.

That’s not the original premise.

#softwaredevelopment #oop

amoroso, to retrocomputing
@amoroso@fosstodon.org avatar

Have a look at this slick vintage lapel pin of LOOPS, the Lisp Object-Oriented Programming System of Interlisp. Its subdivisions symbolize the programming paradigms LOOPS supports:

  • Rules: rule-based
  • Obj's: object-oriented
  • AV's: access-oriented
  • KB's: knowledge-based

https://github.com/orgs/Interlisp/discussions/1666#discussioncomment-9158828

MBoffin, to gamedev
@MBoffin@mastodon.social avatar

Been playing in and having a blast. But working in be like... 😆

Crell, to programming
@Crell@phpc.social avatar
jbzfn, to FunctionalProgramming
@jbzfn@mastodon.social avatar

🤝 Ending the war or continuing it? Let's bring functional programming to OOP codebases | Cherry Ramatis

https://dev.to/cherryramatis/ending-the-war-or-continuing-it-lets-bring-functional-programming-to-oop-codebases-3mhd

symfonystation, (edited ) to random
@symfonystation@newsletter.mobileatom.net avatar

Reblog via Arnaud Langlande

🚀 Are you still leveraging heavy inheritance in your Object-Oriented Programming (OOP) projects?

🤔 It may be time to reconsider your strategy!

I explain 🧵 👇 [1/3]

🖼️ Image: https://unsplash.com/@gabrielsanchez

https://files.mastodon.social/media_attachments/files/111/935/091/021/418/678/original/09e7f7de3dca423a.jpghttps://newsletter.mobileatom.net/8146-2/

thelastpsion, to random
@thelastpsion@bitbang.social avatar

Musing on #ctran.

I'm starting to wonder if there's any point in having the lexer and parser as two separate classes.

Other than testing, the lexer is only ever going to be called by the parser, and only once during the process.

It might be better to just have a lexer-parser class that grabs a file, tokenises it, then (if it's happy with the file it's tokenised) immediately turns it into a tree.

Is there a really good reason why they should be separate classes?

#compiler #objectpascal #oop

Sergio, to php
@Sergio@fosstodon.org avatar

Okay , I'm a decent , and kinda get the concept. However, I'm having trouble making the mental switch from procedural code. I end up writing static calls to classes... 😅

I work, on and would love a good resource/course on making the final switch. I know there are times for each style, as they are just tools in the toolbox. But I want to be able to have my brain think in that manner.

I've seen some great posts, but they end up being quite terse for me.

syntaxseed, to wordpress
@syntaxseed@phpc.social avatar

I've been brushing up my skills in anticipation of a couple new contracts I'm negotiating.

Decided to attempt to rewrite my company website onto in, learning theme dev along the way. It's going swimmingly. 😁

But ug. The standards for WP are so old fashioned, it's a weird backwards learning curve.

syntaxseed,
@syntaxseed@phpc.social avatar

Snake case, snake_case EVERYWHERE!! 😵‍💫

Who needs when you can have "global oriented programming"!!

Though I must confess that just having access to global functions & values everywhere is surprisingly delicious. LOL

deadblackclover, to Java
@deadblackclover@functional.cafe avatar
nixCraft, to random
@nixCraft@mastodon.social avatar

No, that code is not encrypted. It is just a Perl code with lots of regexes. 🤷🏻‍♀️

mjgardner,
@mjgardner@social.sdf.org avatar

@pjakobs @mina @nixCraft Noun-verb is not the only paradigm. In fact, that was not even how object-oriented was originally conceived: http://userpage.fu-berlin.de/~ram/pub/pub_jf47ht81Ht/doc_kay_oop_en

suzi_1960, to random Dutch
@suzi_1960@mastodon.nl avatar

Goedemorgen iedereen . Mijn collega is ziek, nu krijg ik een vervanger van 75 yo. het is handig omdat we de hele dag in groepjes werken, maar , ik heb vaker met hem samengewerkt, ik kan het net zo goed alleen draaien, want die man is niet vooruit te branden. Maar ja, tekort aan personeel doet wat…. En, ik vertik het om alleen te draaien omdat ik daar nog steeds niet voor gecompenseerd wordt. Ik krijg geen cent extra als ondersteuner om een klas zelfstandig te draaien.

redegelde,

@suzi_1960 ik ben steeds meer het laten "klappen" fan geworden. Snap de discussie tussen Bevoegd en Bekwaam. dit is mooi voorbeeld. waardeer je personeel op hun kunnen. We overspoelen social met leraren te kort. er lopen zoveel mensen rond.

redegelde,
@redegelde@mastodon.education avatar

@suzi_1960 @redegelde ik geef even antwoord vanuit mijn account. Ik denk dat 1 op 2 perfect werkt. 1:bevoegd en bekwaam op 2 bekwaam die 25% ophoging krijgen bij volledige groep draaien.

thelastpsion, to retrocomputing
@thelastpsion@bitbang.social avatar

A summary of my first impressions of 's object oriented ecosystem for .

TL;DR: It feels janky, but I'm also a noob. Plus what about Objective-C?

I'm certain there's loads that I've missed with this. Do feel free to comment with constructive information.

https://hackaday.io/project/161291-the-last-psion/log/226441-beginning-olib-an-entirely-uneducated-look-at-psions-proprietary-object-oriented-c

janriemer, to rust

Software engineers should really look more into #ECS and #DataOrientedDesign architecture when designing software. This is especially useful in software systems written in #Rust.

It is mostly used in #GameEngine's, most notably in #Bevy #BevyEngine, but is very useful outside of #GameDev, too.

It all comes down to this:

  • separate data from behaviour
  • favor composition over inheritance

It's the antidote to #OOP.

#RustLang

1/2

janriemer, to rust

Some time ago there has been an interesting thread over at forum, where someone asks for "help to escape OOP in Rust".

I've tried to help them escape with the following answer 🙂

https://users.rust-lang.org/t/im-still-thinking-oop-in-rust-please-help-me-for-escape/93737/36?u=janriemer

Are you willing to escape from in Rust as well!?🙂

nebyoolae, to random
@nebyoolae@masto.neb.host avatar

Admission: I'm terrible at O(bject)O(riented)P(rogramming).

My solution to writing code from scratch is always to go procedural. As the complexity ramps up, I just keep making my structure more unwieldy.

Today's Advent of Code, however, finally triggered a "wait, why am I making multidimensional array hash blarfos when I could just make a CLASS with METHODS?!" epiphany, and I'm here for it.

mattjbones, to rust
@mattjbones@mastodon.social avatar

Is it a mistake to try in #C++ this year?

Last year I tried it in and it might actually be interesting to compare the two. That said my C++ is fairly lacking so it’s hardly going to be a fair comparison, still could be fun tho.

mattjbones,
@mattjbones@mastodon.social avatar

I quite like ... there's something neat about inheritance where my RunnerBase defines everything common and then the Two : RunnerBase overrides a protected method get_result_for_part_1 and that's where the implementation lives.

I did something similar in after day 15 where I created a trait that each struct [Day] {} could impl and this acted as the common interface for running part_1 / part_2 .

Both do the same thing but slightly different, is more flexible tho.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • GTA5RPClips
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • osvaldo12
  • Youngstown
  • ngwrru68w68
  • slotface
  • everett
  • rosin
  • thenastyranch
  • kavyap
  • tacticalgear
  • JUstTest
  • modclub
  • normalnudes
  • cubers
  • ethstaker
  • mdbf
  • Durango
  • khanakhh
  • tester
  • provamag3
  • cisconetworking
  • Leos
  • anitta
  • lostlight
  • All magazines