Readit News logoReadit News
jiofih commented on JavaScript Is Weird   jsisweird.com/... · Posted by u/robin_reala
hootbootscoot · 4 years ago
1) you confuse me with a CS major on another thread. pick the right feud please.

2) "you couldn't have picked a worse example" HAAAA! You are wrong. wrong wrong. A) Do you even know what a memory leak IS and why/how it occurs? B) Did you understand what I said regarding stack allocation and out-of-scope equals "memory gone" and how that fundamentally differs from heap-based allocation as ALL JS OBJECTS ARE!??? you are wasting my time, friend.

you are straight up copying marketing lines from node.js with no apparent understand of what a single threaded event loop even is! (it is a gui system. almost all windows-style apps since 199whatever have an event loops as ONE of it's threads. Open X-code or Visual Studio and make a generic desktop app, and add a button and make it's click handler call a method of something or other. Check a moderately complex audio visual production application for clues on just how many threads one uses and for what purposes are they separate threads, etc.)

You then mention VERTX AND GOROUTINES RIGHT AFTER EXTOLLING THE VIRTUES OF A SINGLE THREADED EVENT LOOP. GO LOOK UP WHAT THOSE 2 SPECIFIC TECHNOLOGIES USE AND DO, VERSUS A SINGLE THREADED EVENT LOOP.

Do note why single core limits exist for single hardware thread execution worlds and stop saying that interleaving tasks on a single execution core is superior to architecting synchronized activity across all cores, and do note that you are primarily referring to CRUD web-dev while positing very erm controversial positions on programming language use-cases.

Node JS is a terrible high-volume web server as all of the alleged virtues you extol are workarounds from the single threaded execution model of what was never designed to be a server language. I will say it again: HTTP is a stateless protocol involving a request (method call) and response (what it returns) it then goes out of scope and disappears. no memory leaks. no heap memory allocation. no malloc. no new, etc. it's just poof gone. got it? this was done on purpose by smart computer people. If you want to run each request as a separate OS process, don't blame HTTP, but the primitives were designed for efficiency.

please DO look up what heap vs stack allocation is. please DO look up what a register vm vs a stack vm is. please DO not confuse scripting or glue code with machine code, as the machine code of your javascript program is precisely the javascript runtime with it's execution paths being puppeted by your script language. you are literally pushing someone elses buttons and calling it computer programming. no offense, that's why it's a high level language not a low one.

when you resort to reductio ad absurdum suggesting assembler as the tool for all programming, you are not engaging with anything I have said or written here, as tools have purposes, not everything is a hammer/nail

in a way, you are not wrong, as a macro-assembler, or C or C++ or Rust or Zig or Nim etc (non garbage collected compiled language capable of outputting machine code as the final target) is the next level up from asm.

Why do you suppose that Chrome is not written in JS but rather largely in C++?

jiofih · 4 years ago
Wait, where do memory leaks come in and what the hell fo they have to do with the subject at hand? I was talking about it’s fit for web servers, not embedded development. I’m disputing very specific comments you have made. You completely ignored what I said, and now accuse me of “copying marketing lines” and not knowing what an event loop is? Really? Is this how you win arguments?

I don’t know what you’re excited about yelling in caps - VertX uses and event loop. Goroutines are cooperative scheduling. Yes, they can also coordinate over multiple threads (guess what, node can too) but the underlying architecture for processing requests is the same.

> Node JS is a terrible high-volume web server

Again, why would that be? Node was invented precisely to be a high performance server. It’s literally it’s purpose, and it delivers. Check out any benchmarks like TechEmpower and guess which platforms you’ll find near the top. I’m not saying it’s the best choice but just stating facts. Nothing else to say here - you obviously have strong opinions but zero hands-on knowledge on this area.

jiofih commented on Confessions of a serial startup software developer   betterprogramming.pub/don... · Posted by u/kiyanwang
nthngtshr · 4 years ago
At least I have some math, it looks like you pulled your numbers out of your butt.

It's true that you won't have 250 jobs in your career. But you don't need 250 jobs in your career. Take 10 jobs over 10 years. Eventually stay at the one that's promising. Startup returns have power law distribution, I'm sure you'll make some money eventually.

I don't know, my math might not be perfect, but it's not as ridiculous as you make it look.

> What are the odds you actually land that 1/250 that has a great exit?

What are the odds you're getting that Google job? Google has 0.67% acceptance rate apparently. That's only 7% probability of getting that job over 10 years. Or do you think you're more qualified and your odds are higher? If you think you're more qualified, then why do you think you're less likely to pick the right startup and get the right startup job?

jiofih · 4 years ago
> Take 10 jobs over 10 years. […] I'm sure you'll make some money eventually

Wasn’t it 1/250? Sorry but you’re pulling numbers out of thin air, all you have here is wishful thinking. Fact is most people who work for startups will not “eventually make some money”, their shares will be worthless.

In order to hit it big, you need to either be at the top of your field, which gets you exposure to unique opportunities, or be really good at picking winners (you might as well switch to VC in that case), or just be lucky. You can’t hop from one random startup to another and expect to become rich.

Again, probabilities don’t work like that. You’re not rolling dice to apply to Google, and FAANG jobs are not unattainable, nearly everyone I know that wanted one, got it eventually. Then you have guaranteed high income.

You can choose either life, and the risk/reward ratio is certainly much much higher for startups, but we have to be honest about the odds - they are not great for non-founders.

jiofih commented on JavaScript Is Weird   jsisweird.com/... · Posted by u/robin_reala
hootbootscoot · 4 years ago
1) I did not originate this "is trash" phrase, but replied to a parent comment you had rather excoriate. I said that Javascript is fine for what it was designed for: a single threaded UI event loop in a web browser. It is NOT good as a high-volume web server, for example. Http has a request and response cycle and is deliberately stateless such that all data goes out of scope and the entire thing can be deconstructed and, poof, no memory overhead nor leaks. It was designed that way, as a protocol.

2) I saw your comment below. You cannot write device drivers in the language of your choice on any of todays popular operating systems, nor on any embedded devices. Device drivers must have low level access to things like memory locations and cpu registers. Such things are not exposed to Javascript and not available. This is not even speaking about performance and garbage collection etc.

Look, Javascript is someones computer program. It can be implemented in very little code: here's an example: https://github.com/cesanta/v7

Languages are not all equal nor do they all function in the same way, and that's not my opinion.

Javascript syntax itself is one thing, and you can certainly feel free to Javascriptify some C++ libraries and make it all look a certain way for specific tasks, while managing things behind the scenes, up to a point... but there is no getting around the fact that SOMEONE and some languages are needed to implement low level systems functionality.

the power of Cython or the Python C FFI is that it allows you to script/glue modular native code.

You then state "C++14 may have been ratified 7 years ago but it's not the target code your build chain spits out"

no, a C++ COMPILER spits out assembler code that then gets assembled and linked into an executable.

The C++ or C code corresponds directly to a given set of assembler instructions which correspond directly to CPU instructions.

You claim that Python programming of microcontrollers is mainstream, but this is not true nor possible. Python SCRIPTING of code modules (that cannot be written in Python) is certainly one way to assemble a system from pre-built legos.

If you refer to knowing what I'm talking about as gatekeeping and egoism, might I suggest that you insist less forcefully in the correctness of incorrect things you state? we could be done with this spat in short order if YOU would refrain from speaking falsehoods. lies.untrue things.

I look forward to your lisp c compiler. make sure that it's 100% lisp from the bottom up, or I'll consider you're having ceded my point. Consider that the lisp you author in has a garbage collection system that lisp cannot have written originally, nor has any semantics for the underlying memory structures of, but hey, I guess if one is committed to pretending that all languages are equal for all tasks, who am I to question ones self-identification with a given language.

jiofih · 4 years ago
> It is NOT good as a high-volume web server, for example

You couldn’t have picked a worse example - your CS major seems to be needing a refresh. NodeJS came to be precisely because V8, single threaded and using an event loop, was GREAT at a high volume web servers. It massively reduced the overhead vs multi-process or thread based web servers and absolutely dominated performance benchmarks and concurrency. We started playing with 1M concurrent connections while you might barely get 100 on Apache a few years earlier. There were other async servers at the time (Tornado, Puma, Netty..) but the async-by-default ecosystem in node was a unique advantage.

Fast forward to today, it’s not an accident that the majority of high-performance web servers now are asynchronous and/or using cooperative multitasking (or even libuv directly, a spin-off of nodejs development): VertX, Actix, h2o, Jetty, go with goroutines, etc. It’s a much more efficient model.

jiofih commented on Bring back menus, QR codes are terrible   slate.com/human-interest/... · Posted by u/lxm
practice9 · 4 years ago
> To whom? This is why you sound entitled.

> you’re complaining

> All of this makes me upset because it sounds extremely insensitive.

> The world is mourning millions of dead

> a bit more empathy.

You're attacking a person for their honest opinion while knowing almost nothing about them, their life etc. In fact you sound angry and insensitive, please keep your emotions under control

jiofih · 4 years ago
Nice way to turn this into a personal attack. I have nothing against this opinion, and said as much above (I might even share it). His attitude and wording is entitled and disrespectful, like this is an inconvenience to him and not the result of worldwide events.
jiofih commented on Ask HN: What should I say to my manager when my performance starts suffering?    · Posted by u/chrishemsworth
100011_100001 · 4 years ago
I am trying really hard to resist judging you by your comment, but I will try.

Human empathy and emotional intelligence appears to lead to a common pattern in communications. For personal questions, you always want to ask gently and not aggressively.

This of course, for a lot of developers appears like an anti-pattern. We like machines, probably because humans are confusing with vague inputs and totally erratic outputs. However the whole "I say things bluntly" approach will at some point limit the developer. "Hard to work with" becomes a thing. Of course this can be hidden blessing for a dev that likes working on code in isolation and not interact with people. From a management stand point though it's a little flag about that person.

Now the funny thing is some of the same people that like to speak bluntly tend to not like it when others are blunt with them. Regardless, let's try this exercise.

Which one of these two paragraphs sound "better"

a) "Hey X, hope you're doing well. Just wanted to check in and see if you'll still be doing N things from here on out, or if you've been spending more time doing ___. If there's anything I can help with please let me know."

vs

b) "Hey X. You haven't being doing N things, and it doesn't seem like you have been doing more of _____. Get your act together or start looking for a new job."

The interesting thing to me is that your interpretation of (a) is that it's passive-aggression, "cracking the whip". That it's disingenuous...and I guess this is when I am going to start judging you...

What if you are wrong? What if the manager is concerned about the well being of their employee? Why do you feel like it's aggressive? I will like to postulate that the email is actually very well written. The problem with "direct & clear" is that the manager would have to be making assumptions. Maybe they are working on _____ and not N. He might not know, he might have suspicions, but he can't be sure. Also if someone is having problems telling them that they appear sad / depressed / unproductive creates more stress to some people. Ever been upset that you got upset?

In essence the manager is communicating. They are saying please give me an update on what you are working on. They are giving her an out, to say "I am working on ____", so in essence they assume good intentions. They are also asking about N. Have they stopped working on it? Is it a lull? Furthermore they are allowing for the employee to bring up any blockers or issues she is facing. The key point is though, they didn't make any assumptions. They are trying to find out the reality of that employee.

jiofih · 4 years ago
Haha. You failed. I can feel the judgement from here. Sounds like the classic preconception of the socially-challenged developer. I thought that meme had died years ago. I promise you I am nothing like that, and not very blunt when communicating either. My role is at least 75% teamwork/management, not development.

As someone else mentioned, there is most likely a cultural divide here. I know you’re not “just checking in”. If you were truly worried about my well being, you would not be mixing that with a progress update. “Let me know how I can help” is also just a backhanded way to tell me something is wrong.

What I would like is a professional conversation (not a blunt one). “Look, X, I’ve noticed you didn’t deliver Y and Z on the agreed timeline yesterday. If you need it we can offload some of the tasks to ABC. As you know we need this live by X because [reasons]. Let’s schedule a call if you’d like to discuss how we can get this back on track. Cheers, Your Manager”

None of the “checking in” bullshit, just honest and direct, but also not offensive or judgmental. A more personal talk can be had f2f or over a call.

jiofih commented on Ask HN: What should I say to my manager when my performance starts suffering?    · Posted by u/chrishemsworth
Timpy · 4 years ago
I don't know about this particular case, but direct and clear can be read more like "accusing" depending on your culture. I think this reads more like "hey is everything okay?" than "why are your numbers dipping?"
jiofih · 4 years ago
Definitely - personally I feel the opposite. The more indirect, the more offensive it reads. “Is everything ok?” tells me there is a problem I need to expose myself (am I underperforming? Do I look unwell? Did I say something wrong?). Feels like a trap.

I’d rather hear what the problem is and how they think it can be fixed. (EU based)

jiofih commented on Ask HN: What should I say to my manager when my performance starts suffering?    · Posted by u/chrishemsworth
ratww · 4 years ago
You basically took a whole long-form comment to repeat what I had already mentioned in my original message:

> However I notice that the specific message on OP is a bit ambiguous, I would personally add some suggestions.

jiofih · 4 years ago
This is a brilliant take, explains how to be clear and direct as I mentioned, and all you can think of is “that’s exactly what I said”?

It’s not. If you can’t tell the difference, we’ll, there’s nothing else to add here, the answer is right under your nose.

jiofih commented on Virtual DOM is pure overhead (2018)   svelte.dev/blog/virtual-d... · Posted by u/rob
btown · 4 years ago
While this may have been true previously, React’s new concurrent mode can leverage a Virtual DOM to split actual DOM updates over animation frames, to achieve perceptual improvements over synchronous DOM updates. Svelte’s AOT compilation approach, I believe, is limited in these kinds of time-spanning deferrals, though I’d love to be proven wrong! https://reactjs.org/docs/concurrent-mode-intro.html
jiofih · 4 years ago
The only reason you need that in the first place is because of how expensive updates in react are. It’s lack of true reactivity and user-controlled memoization lead to a ton of trashing.

Svelte on the other hand is as optimized as possible - update the data, modify the corresponding DOM pieces directly. There is no realistic use case where you’d need to spread an update over multiple frames.

jiofih commented on Confessions of a serial startup software developer   betterprogramming.pub/don... · Posted by u/kiyanwang
nthngtshr · 4 years ago
Take it with a grain of salt as I'm someone who only worked at startups my whole career (~10 years), but I had a very different experience over the years, and it saddens me to see this kind of content on HN.

I love small companies, I love the chaos, I love having that bond around some crazy idea that might never work. I love being in the know about how things work and why people buy our product and things like that.

> You’ll Work Hard Instead of Smart

There's this idea that you're overworked and under constant stress when you work at startups, and I genuinely don't understand what people are talking about. I would say don't work for people that want you to work hard and not smart, regardless of it being a startup or not. Don't let shitty bosses force you to work when you don't want to (e.g weekends). As someone who knows how to code you almost always have leverage here.

> Your Equity Is Worth Nothing

It's not nothing. Sure, it's risky, but people do make money. Do it long enough and you'll get lucky (maybe). And quit shitty startups quickly so that you don't waste your time.

RE expected value, I think it's funny that when people do these calculations it's always all startups vs top 5 tech firms. Why not compare it to YC startups for example? If 1 out of 250 ends up being a $100B company, 0.25% of equity you earn per year is $1M in cash. Try to beat that working at Facebook.

> You’re Giving Up Mentorship

It is true that startups are generally less prepared to mentor you. Personally, I believe that mentorship is overrated, but I could see how this is important for some people, especially early on in their careers.

jiofih · 4 years ago
> If 1 out of 250 ends up being a $100B company, 0.25% of equity you earn per year is $1M in cash.

Sound like the kind of math a startup would use to lure you in. More like 99.75% of the equity you gain will be worth nothing. And you won’t have 250 jobs in your career. What are the odds you actually land that 1/250 that has a great exit? Less than one in a thousand.

jiofih commented on Ask HN: What should I say to my manager when my performance starts suffering?    · Posted by u/chrishemsworth
ratww · 4 years ago
> Please don't assume the question is "disingenuous." It's an invitation to talk about what's going on, and bring the manager into the loop. Most managers really do want to help!

^ That's a very important reply. Whenever I send one of those messages like OP quoted, what I really mean is to ask if there's anything I can do to help.

A manager is not an old-school "boss" responsible for cracking the whip. Managers exist to coordinate, organise, bridge communication, remove obstacles... It takes several conversations with higher-ups and with HR for a manager to fire someone, and if I fire people too often people start questioning my ability to hire and manage.

However I notice that the specific message on OP is a bit ambiguous, I would personally add some suggestions ("do this instead", "let's ask X for help, they have experience with this kinda stuff").

jiofih · 4 years ago
Why not ask direct & clear then? I also think it sounds disingenuous. This kind of passive-aggression is what “cracking the whip” feels like for employees.

u/jiofih

KarmaCake day3583October 2, 2019View Original