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

Surprising to see an almost 50% rise year-on-year for C. What's the explanation?

comment 9y ago · link · parent

Code reviews come first, because you can't write good unit tests without them. And poor tests can make your life horrible.

comment 9y ago · link · parent

It doesn't take a leap of logic at all. All it requires is some fairly simple economics.

Someone has to pay for content. You don't view ads, and you don't buy subscriptions. You also never donate. What do you think will happen next?

Well, some businesses die, but most don't. At the Guardian, we had to rely on three things:

1. We had to make about three hundred people redundant. (This is the human cost of the problem - not that some fatcat makes marginally worse dividends, but that a print worker who's done this job since 16 is now being turned out at 42)

2. We had to diversify our revenue streams. One way became 'native advertising': content sponsored by companies, like an article on the history of whiskey with a Jack Daniels badge, etc. Editorial hated this. Oh, boy, they objected. They fought in every principle and at every point available. They relented when they realized they were next for redundancies.

3. Then there were us, in commercial. Firefighting bad ads coming via the network, trying to resist JS hogging full page experiences, writing ads in the highest performing fashion we could to make the best of a bad situation. No-one liked us.

I didn't stay for long. I'd like to say I left because I was disgusted with the seediness of the ad industry, but the real reason was that the job was boring and depressing. We weren't saving the newspaper and we weren't making ads better.

Personally I think the only solution is the paywall. That's how newspapers worked for 250 years: you gave your dollar and you got your daily edition. You could trust your paper because it was more beholden to you than to any other interest. Will people accept this, though?

comment 9y ago · link · parent

And how are they to 'go pro' if there is no business model to be a professional journalist / researcher / reporter / documentarian?

I think you believe we can get all our content from local, interested bloggers. We can't. There is no filtering and no curation. There are no stakes in telling the truth because no one has a business to defend. Pulling information together and filtering out the rubbish is long and arduous and it's work. That's what journalism actually entails, not the writing part, which is fairly trivial.

But yours seems to be a typical HN response. "People feel this is important to do without being paid, therefore we should not support them as a society". It is an attitude I cannot comprehend. Something is important to our civil society - why not make doing it a viable living?

comment 9y ago · link · parent

Echoing the user 5zBFyURxgY, I would say "don't".

The problem is not the language or even the ecosystem, but the jobs. Most JS gigs are not interesting and not technically challenging. For all the noise the community makes about us being 'engineers', the overwhelming bulk of JS jobs today are just the CSS/HTML tweaking roles of five years ago implemented in 2017 technology.

Occasionally you will get to write some Node server code. These apps will usually be thin proxies over 'real' API web services and the tickets will generally be about marshalling data, waiting for asynchronous responses and handling authentication.

I have been lucky enough to do better: first an adtech R&D role (mixed bag - I hate adtech as an industry, and I loathed our rapacious attitude to people's personal data, but I had lots of autonomy and got to manage my own feasibility studies); the second was a soujourn into web VR (not as technically deep as it sounds - you might get to write a shader or two; that's it).

JavaScript development is good if you want to make decent money doing something easy, and never worry about unemployment. It is not good if you want anything else. It is not a promising field if you want programmatic challenges; if you want to build in a niche of domain-specific knowledge; if you don't like relearning basic tools because the basics keep being reinvented; if you want to be respected as more than a pixel wrangler (you get a LOT of direct requests from senior managers to swap things around etc.); or if you want to keep your options open.

That last point is important. It is quite hard to move out of front end development. The field still has a poor repuation, and because the work is generally basic employers tend to be a little sceptical of your skills. Not insuperable but definitely a strike against JS as a specialism.

I really regret not getting out of JS when I could.

comment 9y ago · link · parent

Oh, no-one needs ad revenue to serve content.

What they need is money to produce content worth reading.

comment 9y ago · link · parent

It is not the server costs that are expensive; it's producing the content.

comment 9y ago · link · parent

> This, in the opinion of many people including myself, will be for the betterment of us all as a society.

If you achieve this, the result will be that the only people who can publish on the net are those with deep pockets and other interests. They may be companies (who write content as marketing), plutocrats (who will publish pro-business propaganda) or the state.

This is where we are heading: where the average citizen learns about their country from a Facebook feed, written by the Koch brothers.

This is going to have incredibly harmful effects on our society, and - I will not mince words - it seems to me the blame will rest with _people like you_.

That means YOU will be responsible for fake news and newspapers competing with the worst of the internet. That YOU will be responsible for advertisement disguised as news. All because you were too outraged to accept ads and too apathetic to pay a few dollars for paper news.

comment 9y ago · link · parent

Thank you for bringing that to my attention.

850.

Which job skills are most employable?(80000hours.org ↗)

111 points · by zero_shift · 9y ago · 69 comments

comment 9y ago · link · parent

> If you two way bind a UI element with a controller variable, and then have watchers or observables on that variable...it is now no longer clear what side effects you're triggering as your interacting with that UI element.

I've heard this argument before, and I really don't get it.

Let's say I have an input bound to a model variable. What does that mean? Well, the model is the single source of truth of state. And the user can change it. Sometimes we have derived state, like computeds in Knockout. These are read-only and are not ultimately sources of truth (though they will never contradict non-derived values).

In this model, I cannot see what is wrong. Why do you need to reason about the side effects your input triggered? Your input should be bound to something that is a fundamental, atomic, irreducible element of the app state. When it changes, the app changes. You never need to reason about this happening because there should never be a moment where a model changes and the app does not.

Excuse me for my naïveté, but it looks to me like two way binding can only cause problems if you are binding inputs to derived values, or if your model is not truly irreducible. In which case, you are knackered before you start: how is your app ever supposed to guarantee consistency of state?

If you are writing Angular or Knockout code properly, in my opinion, the data flow should be unidirectional just by dint of using an irreducible model and never manually overwriting a derived value.

Just because the template has a two way binding to a model does not mean the data flow is pandirectional. Likewise, one way binding does not guarantee unidrectionality: I am fairly sure you could write a React-Flux app where components emit arbitrary actions in response to state changes. Perhaps this is banned in Redux, though.

comment 9y ago · link · parent

I've been in this gig for years upon years and I still don't see what's terrible about two way binding.

Can someone actually justify it without handwaving statements like "you'll notice at scale", or red herrings like "Angular is slow"?

comment 9y ago · link · parent

I don't think I buy your defence. Sure, you can make JSX look readable - if you decompose your markup into a thousand scattered functions. But this just swaps one problem for another: indirect code, verbosity, not being able to see the component markup at a glance.

I just feel JSX is too awkward and verbose to be pleasant working.

comment 9y ago · link · parent

I feel like JSX is the biggest failed promise of React. It's supposed to make the behavior of views transparent by building markup in plain JS. But what actually happens is you have to write noisy JavaScript that obfuscates your markup.

Just look at any component that dynamically generates CSS classes. Template strings with ternaries? Another dependency for generating nice CSS class strings? Give me a break.

JSX falters because JS is not terse enough. You end up with templates that have neither readable logic nor readable markup. And naturally, programmers being as lazy as they are, these templates become a holding bag for -every- concern.

comment 9y ago · link · parent

Why not just write,

"We want to add the software version number to the dialog. We think they will then cite this when they raise tickets"

?

At least in this form, you can expand on the context and justify it in depth.

Also, user stories often phrase the context as a given when it's really not. In your example, it's an implicit premise that a version number may help. In mine, the writer admits scepticism and therefore invites the programmer to think up some better solution.

comment 9y ago · link · parent

I cannot prove the contents of an internal university policy, but I think you are trying to make excuses for a story you find exciting.

comment 9y ago · link · parent

It seems the text was revoked as it was in violation of university policy.

comment 9y ago · link · parent

If this is true, it's still seems to me a non-story. A tenured professor wanted to break the university's rules... and wasn't allowed to.

comment 9y ago · link · parent

The course syllabus cited here currently lists no such policy.

The ultimate source appears to be an alt-right news site that likens this "student appeasement" to appeasement of Hitler's invasion of Czechoslovakia. It then goes on to insinuate that campus welfare programmes are triggering the downfall of society.

I'm suspicious.

comment 9y ago · link · parent

> You imply bias in the the hiring process is what is causing the gender imbalance in tech. Indicators such university enrollment in CS programs show that this is unlikely to be the case.

You are assuming that women are choosing their college degrees in a vacuum. They don't. They ask: can I see myself doing this job? Is this a worthwhile investment? And when they cannot see themselves working in tech, because they see no-one like themselves in IT, they choose other fields.

> Unfortunately, our supply of women is governed by a mostly government run school system that doesn't exist in a world of supply and demand and likes to shift the blame for their ineptitude.

What specific mistakes can you point to? What particular solutions are within reach of the government? Because right now this just looks like shifting responsibility onto the state.

861.

JSTOR have made 600 books open-access. Find a list of them here(gist.github.com ↗)

22 points · by zero_shift · 9y ago · 6 comments

862.

Monkey selfie photographer goes broke in primate/human copyright dispute(theguardian.com ↗)

1 points · by zero_shift · 9y ago · discuss

comment 9y ago · link · parent

Anec-data-ly: it seems to be very popular with children and teens. The sons and nephews of several friends really look forward to the next episodes of their favourite YouTube series. Don't know if girls have the same degree of interest, though.

comment 9y ago · link · parent

Looking at that article, it seems nearly every complaint is about inheritance. But it is quite possible to use objects with composition. In fact, I think 'composition over inheritance' has been a commmonplace since the late 1990s.

comment 9y ago · link · parent

Maybe they are incredible.

I suppose the reason I don't 'get' Redux is probably that I don't 'get' the problem it claims to solve. Redux developers seem to say their issue with prior frameworks was that it was difficult to understand where state changes came from. But that's just not an issue I've had in the apps I've built.

Maybe the apps I call 'thick client' really aren't? Then again, I've done a fair few gigs in this game, on lots of kinds of projects, so I'd expect by now to have the perspective to say which was which.

That experience also makes me a little stubborn. I've had a few exchanges like this, where people have reacted with incredulity. They remind me a little of the arguments I had convincing people to abandon 'semantic' CSS, or grouping templates and view logic into components. I think history was on my side, at least in those cases, so I no longer feel abashed to walk against the crowd.

comment 9y ago · link · parent

> We also saw no real value in strictly splitting up actions, action creators and reducers among multiple files. We simply put actions, action creators and reducers that belong together in a single file.

I think that's a much more pragmatic approach for smaller applications.

comment 9y ago · link · parent

> "You wanted a banana, but what you got was a gorilla holding the banana, and the entire jungle."

When you say that, what exactly do you mean by it?

comment 9y ago · link · parent

> Yes, Redux requires some amount boilerplate code

I think you're underplaying this. The Redux apps I've seen thread data through a great many layers - action creators, actions, reducers, sagas, schemas - and I think it's fair to say that compared to other projects, Redux apps have very long 'chains of operation' (I want to avoid value-laden terms like 'structure' or 'bureaucracy').

Is it worth it? I'm not sure. The Redux apps I've seen have used this 'highly formalized' approach to handle quite simple interfaces. Maybe I'd have different feelings if I was writing something bigger?

It's not that I hate Redux, or think it out and out 'sucks'; but I've worked on a lot of projects and first Redux ones I've worked on seem unusually difficult to reason about, and a few of my colleagues share my feelings. We feel like it is hard to reason exactly what an event or command exactly 'does', and that the diffusion of behaviour across files plays a part in that.

comment 9y ago · link · parent

From where I'm sitting, your reply looks a lot like an insult. I hope I'm just reading it badly, but as is, I don't think we're going to have a productive discussion.

comment 9y ago · link · parent

> How do you find out which part of your code set your global mutable state object

Generally, it's easy. My state variable represents a single concept in my problem domain, so there's usually only a single source of truth that would ever update it.

> What if two or more bits of logic try to set this variable at the same time

Generally, this will only happen if the variable is actually a derived property, rather than a primary one. I handle this by making my primary properties observables, and my derived properties read-only computeds. Taking this approach, I don't think I've ever had the quandary you describe, and I've built everything from very thick SPAs to very thin and nimble content sites.

> How will you control that `myvar` can only be set to particular values dependent on other state?

It seems to me a matter of simple discipline.

> How will a QA engineer demonstrate to you that it was this state change which broke your application?

She might write a failing test case, or use the debugging tools I've added to the console. She certainly wouldn't mess about with something as proprietary as Redux devtools, because at that point I'll be unable to move to better JS technologies without getting cross-team buy in. At most companies, that basically means it just won't happen.

1
2728293031