|
meatpotato posted:YOSPOS Terrible programmers are good friends best way to understand also I recall the article "Objects, Icons, and Software ICs" in the August 1986 issue of BYTE being good as an introduction to OOP
|
# ? Sep 16, 2015 01:27 |
|
|
# ? Jun 2, 2024 05:48 |
|
as a bonus the article right before it is an extensive one on smalltalk so glad archive.org has a mostly complete BYTE collection from the days when they didn't suck
|
# ? Sep 16, 2015 01:34 |
|
and the Brad Cox article isn't all that great after all, it's more "here's how you use pre-NeXT ObjC to do a thing" than it is "here's how I conceive of objects and classes etc."
|
# ? Sep 16, 2015 01:43 |
|
meatpotato posted:I'm employed so this is might be part of the problem too, in that network protocols are basically not something OO is great for. like the common features are: -how i write thing to {array, stream} -size in network bytes marshalled, if you are feeling nice -and a way to read from {array, stream} (which should static function for Reasons and isn't OO in any of the alternatives) there might be other common things, but those can wait for v 2 after people start yelling about them you can get really far with the minimum, which is just structs with a write method and static read method stapled on
|
# ? Sep 16, 2015 01:45 |
|
NihilCredo posted:if your language has first-class functions, just pass that poo poo like it's a fat blunt and you're a good friend
|
# ? Sep 16, 2015 01:47 |
|
maybe the difference in expectations is also that peeps expect you to staple read/write methods to structs and you're worried about making the most wonderfulest OO design
|
# ? Sep 16, 2015 01:52 |
|
Brain Candy posted:maybe the difference in expectations is also that peeps expect you to staple read/write methods to structs and you're worried about making the most wonderfulest OO design so what you're saying is that he's trying too hard not to be terrible
|
# ? Sep 16, 2015 02:27 |
|
inheritance tends to be overused i think. big inheritance hierarchies are brittle and a huge bitch to refactor once you realize you hosed up by making a big inheritance hierarchy some alternatives to think about are composition (maybe your object should have an instance of another class instead of deriving from it) sometimes you don't need inheritance to extend a class's functionality: external functions can operate on your object, e.g. C# extension methods thanks for reading, i put a lot of thought into this post
|
# ? Sep 16, 2015 02:31 |
|
gently caress I love extension methods
|
# ? Sep 16, 2015 02:32 |
|
turn multidimensional arrays into numeric matrices with one weird trick
|
# ? Sep 16, 2015 02:33 |
|
AWWNAW posted:inheritance tends to be overused i think. big inheritance hierarchies are brittle and a huge bitch to refactor once you realize you hosed up by making a big inheritance hierarchy inheritance tends to be easier to manage when it's more wide than deep the taller the tree the more brittle the branches
|
# ? Sep 16, 2015 02:35 |
|
i love C# and F# and i hope i get to keep using them when everyone stops running windows servers
|
# ? Sep 16, 2015 02:35 |
|
I've never been good at all that OO stuff and functional programming was so drat amazing for never having to think about that poo poo ever.
|
# ? Sep 16, 2015 02:37 |
|
eschaton posted:so what you're saying is that he's trying too hard not to be terrible p. much. really knowing what you can let slide is a thing that comes with experience
|
# ? Sep 16, 2015 03:05 |
|
NihilCredo posted:last Friday I wrote my first abstract class. it lasted around 25 minutes before i thought "wtf am I doing" and changed it to an interface and a couple of static methods another terrible programmer thread success story!
|
# ? Sep 16, 2015 03:39 |
|
meatpotato posted:Understood, I sometimes write C like that for device drivers and it can work well in my simple mind. I even know how a vtable works (yeah, I know that's not impressive) it's just understanding how to use things like inheritance to my advantage, not disadvantage in a design that are hard. fwiw the vast majority of programmers would be way more impressed by someone who writes drivers than someone who can do oo
|
# ? Sep 16, 2015 04:03 |
|
NihilCredo posted:last Friday I wrote my first abstract class. it lasted around 25 minutes before i thought "wtf am I doing" and changed it to an interface and a couple of static methods tw for programmers stuck programming without interfaces
|
# ? Sep 16, 2015 04:04 |
|
AWWNAW posted:i love C# and F# and i hope i get to keep using them when everyone stops running windows servers F# makes me loving static
|
# ? Sep 16, 2015 04:12 |
|
Bloody posted:gently caress I love extension methods good thing a friend of mine added categories to Objective-C in the early 1990s then eh?
|
# ? Sep 16, 2015 04:29 |
|
i mean code:
|
# ? Sep 16, 2015 04:29 |
|
Today I wrote a bunch of Java 8 and had to do shitload of stuff with collections. The new streaming api kicks rear end and writing java was actually fun instead of a stupid boilerplate chore.
|
# ? Sep 16, 2015 05:45 |
|
pepito sanchez posted:i mean I think the typical Microsoft stack code monkey distrusts anything that doesn't come out of the box. Until recently you had to install a plugin to get F# in VS, and you still need the power tools for such amazing tech as "folders" when I told my boss we were going to do the next major project in f#, he had one single question: "are you sure Microsoft will still be supporting it 4-5 years from now?"
|
# ? Sep 16, 2015 07:57 |
|
meatpotato posted:YOSPOS Terrible programmers are good friends . This is hands down the best thread in yospos
|
# ? Sep 16, 2015 09:11 |
|
pepito sanchez posted:i mean I know it wasn't your point but bear in mind that 1) this is a terrible implementation of quicksort (large amount of churn, and using the first element as the pivot gives it awful performance on mostly sorted lists) and 2) please dont write your own sorts people, jeez
|
# ? Sep 16, 2015 09:14 |
|
eschaton posted:good thing a friend of mine added categories to Objective-C in the early 1990s then eh? I don't know what any of that means so ok
|
# ? Sep 16, 2015 10:05 |
|
react is dramatically better than every other js thing i've ever used and comically better than every frontend js framework i dont even give a gently caress about shadowdoms or speed it's just really good at displaying things in the browser really want to give relay/graphql a shot too DONT THREAD ON ME fucked around with this message at 10:27 on Sep 16, 2015 |
# ? Sep 16, 2015 10:21 |
|
MALE SHOEGAZE posted:react is dramatically better than every other js thing i've ever used and comically better than every frontend js framework check out elm
|
# ? Sep 16, 2015 10:26 |
|
gonadic io posted:I know it wasn't your point but bear in mind that 1) this is a terrible implementation of quicksort (large amount of churn, and using the first element as the pivot gives it awful performance on mostly sorted lists) and 2) please dont write your own sorts people, jeez don't write any algorithms, someone has already done it quicker and better using less space
|
# ? Sep 16, 2015 10:28 |
|
fart simpson posted:check out elm elm is very cool but unlike react, there's almost no way i'm convincing anyone to start using it
|
# ? Sep 16, 2015 10:28 |
|
Awia posted:don't write any algorithms, someone has already done it quicker and better using less space much like your posting
|
# ? Sep 16, 2015 10:34 |
|
i never said i follow my own advice
|
# ? Sep 16, 2015 10:34 |
|
Bloody posted:I don't know what any of that means so ok gloatuing
|
# ? Sep 16, 2015 11:03 |
|
MALE SHOEGAZE posted:tw for programmers stuck programming without interfaces don't you work in ruby?
|
# ? Sep 16, 2015 11:52 |
|
Awia posted:don't write any algorithms, someone has already done it quicker and better using less space rewrite all the algorithms as long as the objective is learning. just don't put 'farting around code' in prod.
|
# ? Sep 16, 2015 12:30 |
|
MononcQc posted:rewrite all the algorithms as long as the objective is learning. just don't put 'farting around code' in prod. this too, if you really want to know how a binary tree works go ahead and write one, just don't do it at work for a real project
|
# ? Sep 16, 2015 12:36 |
|
gonadic io posted:This is hands down the best thread in yospos
|
# ? Sep 16, 2015 13:20 |
|
Awia posted:this too, if you really want to know how a binary tree works go ahead and write one, just don't do it at work for a real project counterpoint: sometimes pooping a thing that kinda works is less work than spending a lot of time researching the best way to do it
|
# ? Sep 16, 2015 14:44 |
|
Symbolic Butt posted:counterpoint: sometimes pooping a thing that kinda works is less work than spending a lot of time researching the best way to do it sometimes?
|
# ? Sep 16, 2015 14:51 |
|
fart simpson posted:sometimes? yeah uh what I mean is, sometimes poo poo doesn't matter and it'll never become a hotspot in the foreseeable future so you can be like WHATEVER YOLO and code the poorest poor man's hashmap or whatever programmer's time is a precious resource, gotta allocate enough time to post in the 'pos yknow
|
# ? Sep 16, 2015 14:58 |
|
|
# ? Jun 2, 2024 05:48 |
|
i think Fart Simpson questioned your use of 'sometimes' as opposed to that always being the best way
|
# ? Sep 16, 2015 16:06 |