|
Soricidus posted:the terrible part is what isn't in js. such as, e.g., any concept of libraries or modules or namespaces or anything, anything at all, that isn't pasting files together and praying they use compatible tricks to pretend the language supports libraries or modules or namespaces. you can say the same thing about C it's annoying but you just live with it
|
# ? Nov 10, 2014 06:52 |
|
|
# ? May 16, 2024 18:36 |
|
rotor posted:you can say the same thing about C at least c has a standard mechanism that everyone uses, which provides for basic separation of interface and implementation, provides a basic level of isolation between compilation units, etc. javascript doesn't even provide any standard method for textual inclusion!
|
# ? Nov 10, 2014 10:48 |
|
rotor posted:you can say the same thing about C not if you don't have to.
|
# ? Nov 10, 2014 15:39 |
|
Soricidus posted:at least c has a standard mechanism that everyone uses, which provides for basic separation of interface and implementation, provides a basic level of isolation between compilation units, etc. idk I think require is fairly standard by now
|
# ? Nov 10, 2014 16:31 |
|
I mean I know it's bad I'm just sayin is all
|
# ? Nov 10, 2014 16:33 |
|
rotor posted:you can say the same thing about C Yeah and like nobody uses c any more
|
# ? Nov 10, 2014 16:39 |
|
Bloody posted:Yeah and like nobody uses c any more no, lots of people do.
|
# ? Nov 10, 2014 17:27 |
|
I just took a list in Java and called stream() on it, then filter(), map(), and collect(). Even used a few lambda expressions. In production code. Am I a terrible programmer?
|
# ? Nov 10, 2014 18:54 |
|
no. lambdas and linq are great
|
# ? Nov 10, 2014 19:05 |
|
altho I disagree w/ the terms used in java linq (like map + reduce)
|
# ? Nov 10, 2014 19:08 |
|
CPColin posted:I just took a list in Java and called stream() on it, then filter(), map(), and collect(). Even used a few lambda expressions. In production code. Am I a terrible programmer? no, but i think you just created a monad
|
# ? Nov 10, 2014 19:19 |
|
which one of those is the monad, though?
|
# ? Nov 10, 2014 19:20 |
|
Shaggar posted:which one of those is the monad, though? gently caress if i know, i still don't understand monads
|
# ? Nov 10, 2014 19:21 |
|
I think individually they are each an monad but together they are also a monad.
|
# ? Nov 10, 2014 19:22 |
|
Shaggar posted:I think individually they are each an monad but together they are also a monad. woah
|
# ? Nov 10, 2014 19:22 |
|
uncurable mlady posted:no, but i think you just created a monad oh no
|
# ? Nov 10, 2014 19:24 |
|
Are monads in Go called gonads?
|
# ? Nov 10, 2014 19:25 |
|
triple sulk posted:Are monads in Go called gonads? lol
|
# ? Nov 10, 2014 19:26 |
|
don't feed your functions after midnight lest they become monads
|
# ? Nov 10, 2014 19:33 |
|
triple sulk posted:Are monads in Go called gonads? no, that's what your pug has
|
# ? Nov 10, 2014 19:35 |
|
rotor posted:no, lots of people do. (I do on the daily)
|
# ? Nov 10, 2014 19:37 |
|
triple sulk posted:Are monads in Go called gonads? Nice!
|
# ? Nov 10, 2014 19:42 |
|
please contain the monad chat to the pl threadrotor posted:idk I think require is fairly standard by now no it's not, it's still exclusively a nodejs feature[*] and es6's import still has no support in any browsers afaik. most people seem to do the iife thing. [*] unless you use a third party extension like requirejs
|
# ? Nov 10, 2014 19:52 |
|
Symbolic Butt posted:[*] unless you use a third party extension like requirejs this is what I'm sayin, seems like most people are doin this now, at least for things you'd expect to be shared
|
# ? Nov 10, 2014 19:55 |
|
guys how do i get good at programming i ask this question all the time and try to act on it and here i am, still sucking more dick at it than a five dollar hooker
|
# ? Nov 10, 2014 20:08 |
|
Careful Drums posted:guys how do i get good at programming no one is good at programming. some people are better at pretending. get better at bullshitting
|
# ? Nov 10, 2014 20:09 |
|
Careful Drums posted:guys how do i get good at programming step 1) use java or c#
|
# ? Nov 10, 2014 20:10 |
|
Shaggar posted:step 1) use java or c# well this isn't the pl thread, i do c#
|
# ? Nov 10, 2014 20:11 |
|
Careful Drums posted:well this isn't the pl thread, i do c# learn all the principles in SOLID and a few other ones like law of demeter I don't know if this is gonna make you a better programmer but it's my specific "get better at bullshitting" advice
|
# ? Nov 10, 2014 20:16 |
|
learn PHP
|
# ? Nov 10, 2014 20:23 |
|
Symbolic Butt posted:learn all the principles in SOLID and a few other ones like law of demeter I don't know what these are
|
# ? Nov 10, 2014 20:31 |
|
Valeyard posted:learn PHP
|
# ? Nov 10, 2014 20:37 |
|
rotor posted:this is what I'm sayin, seems like most people are doin this now, at least for things you'd expect to be shared sure, you can work round some js flaws with third-party extensions, and some people use them some of the time, and this is not a bad thing, so far as it goes. there is a huge difference, though, between "javascript has modules" and "most of the benefits of modules can be achieved in javascript by using one of various third-party libraries, provided you don't mind that they are not available out of the box, they are not mentioned at all in many of the books or tutorials that you might try to learn from, and since they are not standardized in any way there is no guarantee of future support."
|
# ? Nov 10, 2014 20:45 |
|
Bloody posted:I don't know what these are off the dome, without looking it up S is singularity principle O is open-closed (open for extension, closed for modification) L is for liskov-substitution (idk what it is but thats what its for) I is for in-out or something? D is for .. gently caress i don't know 1/5 fail
|
# ? Nov 10, 2014 20:54 |
|
Careful Drums posted:off the dome, without looking it up actual answers https://en.wikipedia.org/wiki/SOLID_%28object-oriented_design%29
|
# ? Nov 10, 2014 20:55 |
|
Bloody posted:I don't know what these are if you want to impress a girl (or a guy) who is really into oop they'll love it
|
# ? Nov 10, 2014 20:56 |
|
This is my understanding of the principles. Someone correct me if I'm wrong: S ingle responsibility principle - a module/class should only be responsible for one area of functionality. The traditional formulation is that it should have only one reason to change. In other words, if you have a class that reads data from a file and then displays it in a window, you might have to change the class for two reasons: first, if the window needs to look different, and second, if the document format changes. That violates the single responsibility principle. O pen/close principle - disallow making API changes that would break existing client integrations. L iskov substitution principle - a child class must not break the API of its parent class. In other words, a subclass could be substituted for a superclass without having to rewrite any of its clients. I nterface segregation - it's better to have a small interface with many implementations for different clients, than one big interface with methods for different clients. For example, instead of a Logger class with logToFile() and logToDatabase() methods, it's better to have an ILogger interface with a log() method, and then FileLogger and DatabaseLogger implementations. D epend on abstractions, not on implementations. This means that, in the above example, it's better for a client of the logger to depend on ILogger than on any of its implementations. This way, you can easily swap out implementations. This principle is what makes Dependency Injection/IoC possible.
|
# ? Nov 10, 2014 21:05 |
|
Careful Drums posted:guys how do i get good at programming EVERY MORNING I WAKE UP AND OPEN PALM SLAM A VHS INTO THE SLOT. IT'S Design Patterns: Elements of Reusable Object-Oriented Software AND RIGHT THEN AND THERE I START DOING THE MOVES ALONGSIDE WITH THE MAIN CHARACTER, uncle bob. I DO EVERY MOVE AND I DO EVERY MOVE HARD. MAKIN WHOOSHING SOUNDS WHEN I SLAM DOWN SOME factory objects OR EVEN WHEN I MESS UP inheritance. NOT MANY CAN SAY THEY ESCAPED THE GALAXYS MOST DANGEROUS anti patterns. I CAN. I SAY IT AND I SAY IT OUTLOUD EVERYDAY TO PEOPLE IN MY maker faire bongo team AND ALL THEY DO IS PROVE PEOPLE IN a maker faire bongo team CAN STILL BE IMMATURE JEKRS. AND IVE LEARNED ALL THE patterns AND IVE LEARNED HOW TO MAKE MYSELF AND MY APARTMENT LESS LONELY BY SHOUTING EM ALL. 2 HOURS INCLUDING WIND DOWN EVERY MORNIng
|
# ? Nov 10, 2014 21:06 |
|
two awesome posts
|
# ? Nov 10, 2014 21:18 |
|
|
# ? May 16, 2024 18:36 |
|
KARMA! posted:EVERY MORNING I WAKE UP AND OPEN PALM SLAM A VHS INTO THE SLOT. IT'S Design Patterns: Elements of Reusable Object-Oriented Software AND RIGHT THEN AND THERE I START DOING THE MOVES ALONGSIDE WITH THE MAIN CHARACTER, uncle bob. I DO EVERY MOVE AND I DO EVERY MOVE HARD. MAKIN WHOOSHING SOUNDS WHEN I SLAM DOWN SOME factory objects OR EVEN WHEN I MESS UP inheritance. NOT MANY CAN SAY THEY ESCAPED THE GALAXYS MOST DANGEROUS anti patterns. I CAN. I SAY IT AND I SAY IT OUTLOUD EVERYDAY TO PEOPLE IN MY maker faire bongo team AND ALL THEY DO IS PROVE PEOPLE IN a maker faire bongo team CAN STILL BE IMMATURE JEKRS. AND IVE LEARNED ALL THE patterns AND IVE LEARNED HOW TO MAKE MYSELF AND MY APARTMENT LESS LONELY BY SHOUTING EM ALL. 2 HOURS INCLUDING WIND DOWN EVERY MORNIng
|
# ? Nov 10, 2014 21:35 |