Better HN
topnewbestaskshowjobs
Log inSign up

zero_shift

4,017 karma · joined Mar 10, 2017 (9y ago) · 930 submissions

I really like computers!
Submissions

comment 9y ago · link · parent

I have always felt that the Redux projects I've seen are extremely bureaucratic. I don't know if they are outliers, if they are just 'Redux done wrong', but typically I find that every piece of behaviour is split out across multiple layers, generally in different files, to the point it is very difficult to reason what a particular button or event will actually _do_.

I notice also that in these projects, every pull request takes many files. Whereas in an Angular 1 project there would be an update to a template and a controller, now each PR comprise updates to a reducer, a container, a component, a saga, a 'lifecycle component', an action creator, and a props schema.

As for Webpack, I don't understand the popularity. I find configuring it awkward, not least because it relies on third-party plugins of highly variable quality. Most plugins are very poorly documented, and those that aren't invariably seem to have big fat DEPRECATED notices. It seems that any plugin that makes enough assumptions to be useful is inevitably chucked in favour of something that is totally configurable but by default equally useless. YMMV.

At least with Gulp, I could step through a build process and write a little bridging code when two plugins stepped on each others toes. Webpack doesn't give me any such chances.

comment 9y ago · link · parent

Honest question: why are React developers so fixated on functional programming? Why are objects - bundles of state and action that represent entities in the problem domain - automatically painted as an antipattern?

comment 9y ago · link · parent

"What happens when I point my browser at $CANDIDATE'S_LAST_PROJECT?"

"What's your strategy for avoiding bugs?"

"How do you choose technologies?"

These three questions will prove

- that the developer understands the technology they work with (they know about networking, infrastructure, the server tech and are curious enough to learn about the runtimes their apps actually live on);

- that the developer has a mature opinion on testing (she knows what is and isn't worth automating, and that E2E automation often has a poor ROI)

- that the developer uses due dilligence and smart heuristics to choose technologies ('write a prototype!', 'eyeball the open source community!') rather than trends and groupthink ('everyone uses React!', 'someone on Medium said it was "curated"!')

These are the real competencies to filter by. The actual programming part, in most jobs, is easy. 80% of the roles I've interviewed candidates for have just been extravagant excuses to move around strings and shuffle integers between databases and browsers. I see no reason to believe this will soon change.

The last time I did anything vaguely 'algorithmic' was when I needed to sort a few thousand items without killing IE8's UI thread, and I solved it fairly trivially by writing a quicksort that used the recursion calls as an opportunity to yield the event loop. That's it. That is as far as most JS jobs go. I think anyone insisting otherwise is just being self-important.

comment 9y ago · link · parent

I've worked as a JavaScript developer for several years, and not once have I had need to write functions checking for palindromes, asserting prime-ness or other such efforts in rewriting lodash.

I guess I must just be missing the job adverts for all those businesses writing JavaScript utility libraries.

875.

An Immigration Lawyer Reviews “Paddington”(freemovement.org.uk ↗)

2 points · by zero_shift · 9y ago · discuss

comment 9y ago · link · parent

You can, but it requires a lot of discipline, and the code you're left with is not particularly fast or elegant.

Still, if you must: create classes to represent components, with methods used to manipulate markup, and plug those methods into a simple pub/sub event bus. This will work for very simple apps, but ask yourself - how simple will your app remain?

comment 9y ago · link · parent

I am currently working on a Node/React project with 120 first-order dependencies. 120! And it's just a crud app with a few canvas visualisations.

comment 9y ago · link · parent

I was. It's been a few years since, though, and I've never seen their AMP page implementation. They are quite strict about never blocking the render, though. Most of the requests you'll see are adverts.

comment 9y ago · link · parent

Low-power phones in developing nations were exactly the platform we targeted when implementing _The Guardian_, and I would advise every seriously global publisher to do the same.

comment 9y ago · link · parent

> I really think that I did very bad choice with my career.

Sadly, I have come to a similar conclusion: tech is a great way to earn money early (because the wages rise quickly), but the ceiling hits early and is quite hard to break through. Use those early years to save up money, then switch to something else.

comment 9y ago · link · parent

> Are we the kind of species that would sacrifice the lives of so many of its own just to satisfy the ego of a few billionaires?

yes

comment 9y ago · link · parent

I worry that I'm wasting my years on a career that keeps me comfortable but doesn't really exercise my mind. I often daydream about working in academia, journalism or some other vocation where I could be paid to research, think and write. Then I snap awake and get back to writing generic web applications shuffling strings around.

comment 9y ago · link · parent

I agree this is a problem - but is it isolated to banking? I can think of at least one non-finance org I've encountered that did much the same: pulled in graduates with big promises and friendly recruiters at milkround conferences, only to slot them into stultifying, dead end support roles where the graduate's skills only withered along with their employability.

comment 9y ago · link · parent

Yes, because they did not want to pay. This is not some complex issue.

Incidentally, I'll be shopping later. May I give you $5 for you to drive to London and take me there? I was going to steal your car, but then I figured I'd be a good citizen and demand you provide it to me at your own, prohibitive, loss.

comment 9y ago · link · parent

I've been writing JavaScript in a professional context for years, and I have never added an integer to a string. I have never debugged code accidentally doing so, and I've never seen functions written that casually swap between such different return types.

Yet here we are, over and over, reading the obligatory complaint in every JS thread about its type coercion and corner cases. Who are all these programmers who can't go a day without tripping over and subtracting booleans from objects, or multiplying arrays by strings, or dividing functions by nulls? Do they suffer this affliction in other languages too? Do they divide by error codes and subtract function pointers from charcodes?

comment 9y ago · link · parent

Honestly, it's not the Russian propagandists I'm worried about. It's the American ones.

comment 9y ago · link · parent

This is also a quick response, on my part.

Basically: you seem to believe people have a right to view the web cheaply. I would argue otherwise. For most of history, humans have had no opportunity to obtain content for free - in fact, for the most part, books and literature have been expensive novelties for all but the most hyper-privileged.

The idea people should pay for content does not seem to me a violation of some inalienable right.

comment 9y ago · link · parent

They are providing content for free on the assumption that you will not block adverts. To imagine otherwise is disingenuous at best.

comment 9y ago · link · parent

Do you care what happens to your newspaper? Because it's not the Buzzfeeds of the world who are suffering because people like you feel entitled to free content. It's the publishers who can actually hold our institutions and leaders to account.

comment 9y ago · link · parent

They're not - and that's one of the big problems facing our civic society. It's just not economically possible to write level-headed content at any real scale.

comment 9y ago · link · parent

Assuming this is serious: actually, no. Academics are ultimately paid by a mix of university tuition fees (paid by students) and research grants (which may come from tax-funded entities, but more generally come from charities and philanthropic orgs).

comment 9y ago · link · parent

And who pays for the investigative reports?

Who pays for the academics who spend their lifetimes researching the field we're reading about?

Who pays salaries so the best people can make a living doing what they're truly great at?

Who makes enough money to get big and old enough to gain a reputation? Without which, the news is a hail of unsubstantiated bulletins from semianonymous writers, a wilderness of mirrors and fake news amped up to eleven?

Believing that we can make content totally free is utopian. You might as well ask why to bother paying software engineers large salaries when open source software exists.

In a world where content is free, all that happens is that newspapers become the organs of plutocrats and political groups. If you want to imagine how the internet looks when content is totally free, imagine a Facebook news feed written by the Koch brothers.

comment 9y ago · link · parent

> some investigators (the senate oversight committee perhaps?) would review his evidence and shut down the illegal bits, and that would be that.

I think you are very optimistic about the way the United States and its various instruments handle complaints, respect the law and police themselves.

I am not an optimist. I think most nations are more interested in their material goals than ideological integrity. I also think that model is more consistent with history than the other.

After all - how would a government with such transparency and integrity let its armed forces fire on civilians to begin with?

comment 9y ago · link · parent

So what's your explanation? That Snowden could have found a way to raise issues through legal channels, could have found a way to overcome internal traction against his whistleblowing, but instead chose to undertake a dangerous and clandestine international chase for the sake of excitement?

comment 9y ago · link · parent

> Why talk to a journalist instead of a judge?

Because that is very dangerous and will usually not work.

Forgive me, but to ask this question seems to me a kind of frightening naivety.

> Again, secrecy is a very important weapon in international relations.

You seem to think it is more important that the US has power than that it wields that power justly. That's fine, but if you believe that, don't cloak your beliefs in the language of 'heroism' or 'responsibility'. When you align yourself with the ends of power at any cost, you will have lost that cause already.

comment 9y ago · link · parent

So, you agree that Google's service is appalling, but claim that it is not appalling because the degree of appal has not changed over time? I cannot follow this logic.

comment 9y ago · link · parent

It sounds like you want to program in TypeScript.

comment 9y ago · link · parent

> "This code is ok if you don't care at all about performance, but in a VR or AR app you can quickly add milliseconds frame time and make yourself sick writing relatively simple code in this style."

---

This point needs to be made more often. It's fine to neglect performance when you're writing a CRUD web app, or a non-critical mobile app - the worst that will happen is the user will get annoyed. But in a VR environment dropping frames can make people physically sick.

1
2728293031