prof_hobart
Joined 15 years ago
Joined 15 years ago
But as I've got more used to it, I'm not sure it's really an issue, or at least doesn't have to be.
Firstly, JSX isn't really HTML. It's a bit of syntactic sugar around JavaScript "createElement" functions. If you don't want to have something that looks similar to HTML in your JS, you don't have to.
Secondly, if you want dynamically generated HTML, you're going to need some form of logic embedded in there somewhere (loops, conditionals etc). Most template languages end up with their own directives, like Angular 2's "ngFor". The React answer is to use standard JavaScript for that control.
And if you then want to separate out the non-display logic, you can use a combination of "smart" (pure JS logic) and "dumb" (JS/JSX display) components, and treat the JSX files as templates. "Separation of concerns" in this context isn't about not mixing code and markup, it's about not mixing business and display logic, and there's nothing in React that stops you doing that.
But an awful lot of people seem to take it to mean the other sense - "in good health, especially because of regular physical exercise", and extrapolate that out to mean that it's always the strongest/fastest etc that survive.
If it's that you can be walking in the countryside when you would previously have had to come into the office for a meeting, then that's great.
If, on the other hand, it's that you've now got no excuse for not working in times you would previously have been resting, then that's pretty bad.
I work in a company that offers pretty good flexibility. You aren't expected to be answering your emails when you're on holiday, but you are often able to work from home if that helps with your particular situation.
I've got my kid's school play in a few weeks, and I could not do a full day in the office and get back to watch it. But I can stay at home, work in the morning and the evening, and then go to the play in the afternoon. I could also choose to take the entire day off as holiday of course, but then I'd be losing a day's holiday. I appreciate this kind of flexibility.
Of course, there's plenty of companies who take the opposite tack - if you've got a work phone, you're now available to be working 24 hours a day, 7 days a week. The advert at the bottom is pretty poor, because it seems to be very much pushing that message.
But most of the original ones could be read either way.
This morning, as I dropped my daughter off at school, some woman pulled off from the side of the road and drove about 30 yards before bothering to look up to see if there were any kids crossing.
Back in the day when both memory and clock cycles were very precious, it wasn't unknown to use self-modifying code as a performance optimisation trick. I did it at least once in the late 80s, when I was working on comms software that had to be as fast as possible in order to avoid missing incoming data.
There was a check that needed to be done on every byte - I think it was whether I was now processing graphics characters or not - but the check was taking valuable time, and the value didn't change very often.
So the most efficient way I found to do it was to wait until I got a "switch to/from graphics" byte in the input stream and then update the instruction at a given location to either be "unconditional jump to graphics routine" or a "no operation (NOP)", which passed straight through to the routine for normal characters.
It was a horrible hack, but it worked.
Thankfully, I've not felt the need to even consider this approach for the past 20 years.
So - and this is a genuine question - what is the issue right now with, for example, the BBC not yet having an IPv6 address, as long as they have plans in the pipeline for when v6-only clients need to access them?
When I've contacted them about it, they've been absolutely adamant that the spammer must have (twice) guessed the exact email address that I've had there.
What it looks like they are trying to do is apply a legally compliant level of taxes retroactively, not laws.
Nottingham, for instance, has had contactless cards for transport for years.
There's an array of confusing different options (some cards will work only on City buses, some will work on any bus but not the tram, some will charge extra when you use the tram, but others won't, their ranges cover different parts of Nottingham etc).
But once you've got your head around that, it works fine.
The statistical idea that a small sample can accurately represent the whole is based on the assumption that the small number are largely indistinguishable from that whole. It's like taking a sample of
In this case, the people voting in primaries are a self-selecting group - people who are both relatively actively engaged with politics and members of one of the two main parties.
It's not unreasonable to think that the wider population (even the wider population of people who normally vote at an election) could behave vastly differently.
For instance, if you had a candidate who was so divisive that they were either loved or hated, then it wouldn't be overly surprising if the vast majority of their supporters had signed up to vote in the primaries, with little support outside of that core. Compare this to a more middle of the road candidate - they might struggle to get as many people out to vote in a primary, but might do far better in the wider population.
That theory is very relevant in the UK at the moment, with the leader of the Labour Party (Jeremy Corbyn) being very popular amongst grassroots party members, but with his enemies saying he could never win a general election as this level of support would never be reflected outside of party supporters.
> 48) Physics and most of biology are just opinions that will change every few years.
then?
An easy way of knowing which versions you should be able safely update to without breaking changes seems hugely valuable.
He talks about APIs versioning, but APIs are only a small part of the problem. How about the hundreds of libraries that my site is built with for example? Semver allows me to specify rules in my package file about whether to take only the exact version that I want, the latest patch, or the latest minor version. I didn't spot anything in the article that showed a better way of doing that.