Live data from Hacker News

Things I Don’t Know as of 2018

overreacted.io

211–220 of 226 posts

Re: Things I Don’t Know as of 2018

#211
post #199
post #182

Earlier quoted context omitted.

Consider that actual rock stars often aren't the world's best musicians from a purely technical perspective - but they're experts at delivering what their audience wants. Dan made a bit of a name for himself in a couple of ways I can think of: creating a very popular library (Redux) and communicating extremely well in English about React and Redux. "Able to communicate about with a broad audience about complex techni…

I’ll grant you this: unless you’re actually playing music to sold-out stadiums, “Rock star” is an insipid, meaningless phrase. I’m not trying to debate the definition. Likewise, I’m not interested in the technical qualifications to be a “communicator”. There are clearly few technical standards for fame. In every other field of engineering, there are standards of knowledge and competency. Software is notable, in that…

Way I see it is it's more than OK to not know things -- it's a necessary optimization. Engineering is all about tradeoffs, and skills development is no exception. Follow one path, forego another; dive deep, sacrifice breadth (and vice versa).

So consider that maybe, just maybe, for a developer working full-time on a SPA framework, not knowing Docker or Bash scripting might not be a real impediment to working effectively or delivering quality product. If it were, perhaps React & Redux wouldn't be as great as they are. And since they are great, maybe we should consider that fact not as a celebrity get-out-of-jail-free card, but as counterevidence to your implication that these topics all constitute a universal educational imperative, and that someone lacking in any of these areas is by definition not a professional in the software field.

Re: Things I Don’t Know as of 2018

#212
The author, Dan Abramov, is a really smart, great and humble guy who has had immense contributions to the front end ecosystem and community.

It's interesting that people who don't know that will view that post negatively but people who know what he has accomplished would be inspired by it.

To end off, pay your respects at: https://dan.church/

Re: Things I Don’t Know as of 2018

#213
post #172

Earlier quoted context omitted.

How was your flight to New York to sell your $7.5 million in bitcoin? Also how is your nurse girlfriend, the one I assume you’re seeing on the side, since you also mention how you outsourcing your coding work allows you to spend so much time with your wife and kids. All you do is post inflammatory lies and boasts to get a reaction. I’m surprised you’ve not been banned.

You want me to reveal names of the celebrity developers. Correct? Not that stupid! What does my bitcoins have to do with anything? And no i am not going to tell wether i sold them or not because that's not good for my security. Yes, people can't have girlfriend outside of marriage? Wife or girlfriend is one and the same thing for me. English is not native language, i use those two words interchangeably. And my girlfr…

We've banned this account for repeatedly violating the site guidelines. Would you please not create accounts to do that with?

https://news.ycombinator.com/newsguidelines.html

Re: Things I Don’t Know as of 2018

#214
post #150

Earlier quoted context omitted.

I’ve been learning programming since 12, got first software job at 18. I’m 26 now. So depends on how you count.

And not that many technologies.

It seems like you were stepping into being personally abrasive here. Please don't do that on HN.

https://news.ycombinator.com/newsguidelines.html

Re: Things I Don’t Know as of 2018

#215
post #14

This has always felt to me like an inconvenient truth most people are too uncomfortable to voice aloud. Maybe we all fear that we're the singular hapless fool adrift in an industry of savants?

> Maybe we all fear that we're the singular hapless fool adrift in an industry of savants? Yes, that's literally the definition of Imposter Syndrome.

I think there are several elements particular to the tech industry that elevates this problem past ‘classic’ Imposter Syndrome. So that label feels a bit reductionist to me, though not entirely incorrect.

Re: Things I Don’t Know as of 2018

#216

Earlier quoted context omitted.

> however ui development is inheritly an object oriented problem due to the IO loop There's nothing OO about the IO loop. The main thing that calls for some OO in UIs is the widget hierarchy.

IO loop necessitates OO unless you do some obscure tricks like passing closures and using a global event emitter. The most obvious way to implement UI is to do OOP. Widget hierarchy does not necessitate OO. Hierarchies can be built with plain data structures. OO comes into play when you place methods within the data structure. Methods coupled with data is essentially an object as described by OOP. Why would you need…

Those claims are somewhat confusing. What is the difference, in your mind, between an IO loop and a "global event emitter"? That's all the IO loop is; an event emitter that fires events at subscribed code.

Do you consider the "OOP"-ness to be evident in the fact that subscription functions (whether 'onclick' functions or 'fetch' callbacks) contain both code to react to events and an implicit binding to the IO loop? Or is your issue that some (not all!) DOM APIs happen to let you attach on-event functions to the same things you can read data out of?

Basically, I don't see why UI programming is any more inherently OO or functional (assuming those are even opposites, which has historically been debated more or less to death) than any other domain. There are UI toolkits that subscribe to each and both of those paradigms, with varying amounts of rigor.

Re: Things I Don’t Know as of 2018

#217

Earlier quoted context omitted.

you're arguing with the guy that built redux and he's being nice about it. you think maybe you should reconsider your position?

I’m well aware of who I am addressing. It seems you’re implying we should make special allowances for people depending on how popular they are. My entire point is that I won’t take someone at their name; I completely reject the idea of the “celebrity” programmer. Redux is pretty neat; IIRC it was a state store influenced by Elm and implemented in about 50 lines of JavaScript. But there are plenty of developers — even…

> who don’t have the same anti-intellectual position of rejecting CT because it isn’t “pragmatic”

Where are you getting anti-intellectualism, rejection of category theory, or a defense of pragmatism at the expense of either of those things? Who is this directed at?

Reading back up this thread, you're the only person referring to those, unless I'm missing an edit somewhere.

Re: Things I Don’t Know as of 2018

#218

Earlier quoted context omitted.

Dan previously used C#, so he knows what static types are. He just said he hasn't used _TypeScript_ specifically. Redux is a simple library that you can read through in a few minutes. It's working great for hundreds of thousands of users. Why would Dan's background scare you off from using it? As for React, there's more than just Dan on the React team. (In particular, Seb Markbage is an incredibly deep thinker, and t…

"and I already forgot most of C#" Does not inspire confidence here. It scares me off for the same reason that hundreds of thousands of people use dynamic languages, and I still believe that this is far from being a good idea. The same way that hundreds of millions of people believe in god, and I still think this is absurd.

> It scares me off for the same reason that hundreds of thousands of people use dynamic languages, and I still believe that this is far from being a good idea.

> The same way that hundreds of millions of people believe in god, and I still think this is absurd.

Well, that takes the idea of a 'programming language holy war' to a very literal place.

Re: Things I Don’t Know as of 2018

#219

Earlier quoted context omitted.

IO loop necessitates OO unless you do some obscure tricks like passing closures and using a global event emitter. The most obvious way to implement UI is to do OOP. Widget hierarchy does not necessitate OO. Hierarchies can be built with plain data structures. OO comes into play when you place methods within the data structure. Methods coupled with data is essentially an object as described by OOP. Why would you need…

Those claims are somewhat confusing. What is the difference, in your mind, between an IO loop and a "global event emitter"? That's all the IO loop is; an event emitter that fires events at subscribed code. Do you consider the "OOP"-ness to be evident in the fact that subscription functions (whether 'onclick' functions or 'fetch' callbacks) contain both code to react to events and an implicit binding to the IO loop? O…

When I talk about an IO loop, I mean external state. The program sends a message to external state, the external state sends a message back. That is a loop. If you get rid of one, you no longer have a loop. you just have IO. If you get rid of both you have just data and no IO. I am not talking about abstractions on top of this loop. A global event emitter is such an abstraction that one can use to hide and block off the impurity of IO from the rest of your code. The most primitive form of IO is the socket.

>Do you consider the "OOP"-ness to be evident in the fact that subscription functions (whether 'onclick' functions or 'fetch' callbacks) contain both code to react to events and an implicit binding to the IO loop? Or is your issue that some (not all!) DOM APIs happen to let you attach on-event functions to the same things you can read data out of?

Look at where events come from and where they are sent. How do you associate the action of button A with the data representing button A? The most obvious way is to merge the action and the data into a single primitive. An object as described by OOP. You will have to do this regardless of what an API such as the DOM offers as primitives.

>(assuming those are even opposites, which has historically been debated more or less to death)

They are opposites. This is only up for debate for people who don't truly understand the differences. In OOP as described by JAVA or C++ you have a graph of mute-able objects instantiating other mutable objects and modifying each other. In functional you have a linked list of composed immutable functions with an input on the head and an output on the tail. Nothing is mutated. To get functional working with UI you need to employ obscure tricks as a UI widget is more of an object than it is a function.

They are opposites according to the most common definition of OOP. They are only orthogonal if you get rid of mutation which is NOT the way most OOP is used nowadays.

>Basically, I don't see why UI programming is any more inherently OO or functional

A UI widget cannot just be a function. A widget in-itself is data, the structure, the display, the color ... etc. And It must react to state and IO like a function. It is both data and methods and thus OO.

Without IO the the widget can just be a plain data structure. HTML is basically pure data. You can still keep it functional if you have a function dynamically generate HTML based on a set of parameters (IO without a loop). However when you need to introduce the "loop" and have UI both send and receive data that's when methods need to be attached to the UI widgets.

Re: Things I Don’t Know as of 2018

#220

Earlier quoted context omitted.

Those claims are somewhat confusing. What is the difference, in your mind, between an IO loop and a "global event emitter"? That's all the IO loop is; an event emitter that fires events at subscribed code. Do you consider the "OOP"-ness to be evident in the fact that subscription functions (whether 'onclick' functions or 'fetch' callbacks) contain both code to react to events and an implicit binding to the IO loop? O…

When I talk about an IO loop, I mean external state. The program sends a message to external state, the external state sends a message back. That is a loop. If you get rid of one, you no longer have a loop. you just have IO. If you get rid of both you have just data and no IO. I am not talking about abstractions on top of this loop. A global event emitter is such an abstraction that one can use to hide and block off…

That's a baffling definition of IO and IO loops. It sounds like you think bidirectional IO is an IO loop, as opposed to unidirectional IO (which . . . does that even exist outside of "write bytes here" shared memory constructs? Even UDP write operations get data back from the kernel), but you also classify a socket, which is typically bidirectional, as just "IO", so I'm not quite sure what to make of that. It sort of sounds like you're talking about asynchronous IO, which is often coupled with event loops (which may or may not be IO loops unless you define time-based conditions as IO) in practice, but doesn't fundamentally have anything to do with them. Is that what you mean?

When you talk about an event emitter, what kind of code structures are you referring to? An EventEmitter a la Node.js is a pretty decent separation of IO and data, though not perfect: something external (perhaps an event loop) triggers subscribed code based on IO, but your code is given only data (payload) to process. Is your beef that 'someThing.onEvent(eventType, e => whatever)' is more 'OOP' than 'bindEvent(someThing.eventType, e => whatever)' is 'functional'? If so, how or why?

In general, it sounds like you might be referring to typical JS asynchronous IO (callbacks/promises/async-await and whatnot) when you talk about IO loops. But I can't for the life of me figure out what those things have to do with OOP vs functional programming, nor why using those structures requires you to store state on a "widget".

> Look at where events come from and where they are sent. How do you associate the action of button A with the data representing button A?

I can say 'button.onClick(() => { button.clicked = true })' just as easily as I can chain every computation which would happen as a result of 'button.clicked' being true onto the event instead. The former is more OOP, colloquially, than the latter, but is definitely not inherent to UI programming: tons of popular patterns and frameworks exist whose primary goal is to remove the coupling between state and UI appearance.

> In functional you have a linked list of composed immutable functions with an input on the head and an output on the tail. Nothing is mutated.

This has nothing to do with functional programming, or a functional style. Immutable data exists as a very common pattern in both colloquially-FP and colloquially-OOP languages, and so does mutable data.

At the point where you start talking about linked lists, I begin to think that you're misunderstanding or misusing some fundamental term we're discussing (Mutability? IO? Functional? Object? I'm not sure): a LL is a data structure (which is mutated by adding/removing elements, traditionally), and has absolutely nothing to do with programming style or paradigm.

> A UI widget cannot just be a function. A widget in-itself is data, the structure, the display, the color ... etc.

No, a data object can contain those things, but in higher-level UI programming, the data object is very very rarely the "widget" itself; it's just data that is supplied to the renderer (the API of which, in web UIs, is the DOM), and the renderer generates the UI based on that.

You can do that in a tightly coupled way and store all your state in the DOM, or you can use any one of many powerful systems that allow you to separate those and perform operations only on data, which can be applied to the external UI state outside of your code. React is a good example of this.

> HTML is basically pure data.

I think you're confused about the difference between HTML (text, can be generated and passed around by code) and the DOM (the API to what is being rendered by the browser). HTML is data, sure.

> You can still keep it functional if you have a function dynamically generate HTML based on a set of parameters (IO without a loop).

That's what event listeners and callbacks are. Whether or not you're dynamically generating HTML, or whether code is mutating it after it's loaded into the DOM, has nothing to do with functional-or-not. Code doesn't stop being 'functional' as soon as its goal is to alter the state of or handle input from some external thing, whether that's a DOM node or a traffic light.

Post reply on HN