1,031 karma · joined Aug 27, 2011 (15y ago) · 583 submissions
comment 9y ago · link · parent
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.
comment 9y ago · link · parent
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.
comment 9y ago · link · parent
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.
comment 10y ago · link · parent
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.
comment 10y ago · link · parent
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.
comment 10y ago · link · parent
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.
comment 10y ago · link · parent
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?
comment 10y ago · link · parent
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.
comment 10y ago · link · parent
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.
comment 10y ago · link · parent
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.
comment 10y ago · link · parent
But the driver shouldn't be allowed to escape blame either. When your car is repeatedly telling you that you need to take control, then you should be taking control.
comment 10y ago · link · parent
The problem, at least for me, is the sleeping bit. I would much rather that people didn't have to sleep out in the streets and if that issue were properly tackled then I doubt many people would be complaining about the benches/spikes etc. But then, we probably wouldn't need anti-sleep benches if the homelessness problem didn't exist.
But as long as that does exist, making public environments hostile to desperate people just looking for somewhere, anywhere, to sleep for the night seems like entirely the wrong answer. It's not solving the problem - it's just moving it to somewhere presumably less pleasant than that bench could have been.
comment 10y ago · link · parent
If you're reading his blog anyway, you'll probably be aware that much of it is about compatibility questions in browsers and wouldn't be surprised that an article on Indian phones is likely to be related to that.
Just seeing the headline in isolation, I was (and I suspect you were) expecting much more "weirdness" - odd shapes, strange keyboard choices, obscure OS options etc.
That's not a fault of the blog, just a result of seeing a headline outside its context.
comment 10y ago · link · parent
If it's one of the handful of places that I use regularly, and want frequent quick access to, it's probably going to be an app. I use apps for my main news sites, for my bus timetable, Facebook, Twitter, Amazon etc.
If it's an occasional visit it's going to be the web. I'm not going to be downloading dedicated apps just to browse a forum that I've been to a couple of times ever, if I'm just trying to check prices across a whole bunch of shops or if I'm trying to get the opening time of a restaurant.
There are a few that fall into the middle ground of visiting every now and then. But for the vast majority of the time there's a pretty clear web/app split, at least for me.
comment 10y ago · link · parent
But you have to make a call at what point you stop trying to understand everything about everything. Thomas Young, the early 19th Century scientist has been famously described as "The Last Man Who Knew Everything" - the sum of human knowledge moves on so vastly that it is simply physically impossible to have an in-depth knowledge of every possible subject.
I don't think he's saying that he knows absolutely nothing about these subject (I'm sure he's probably got a rough idea that the oil probably came in a big oil tanker for example).
But there's over 5 billion articles on Wikipedia, and at some point you've got to decide that you haven't got time to understand how the Four Hu (to take the first random topic I found) came about because you're spending time thinking about how AI works or whatever.
comment 10y ago · link · parent
And if the rumours are true that Apple will release a lightning -> 3.5 mm female for standard earphones, there's nothing stopping them (or someone else) releasing a lightning -> 3.5 mm male to replace that cable.
comment 10y ago · link · parent
It's more that a lot of companies are looking for much more than someone's ability to simply churn code out these days, and if this place was one of those then it simply sounds like this guy wasn't suitable for that role.
If, on the other hand, the company was actually looking for a coder to be able to write 100% perfect code on a whiteboard, and was planning on marking them down for syntax errors, then he's probably better finding out what sort of company they are during the interview than after accepting a job.
comment 10y ago · link · parent
Are you talking about this specific case or in general? I've sat in on several interviews where someone's been asked to write something up on a board, and we were definitely not looking for 100% correctness.
>Also when you do whiteboard u look for view of audience and in interview it is not the case
Why not? An interview isn't an exam. It's a chance for both parties to find out if they could, and would want to, work together. I expect them to be two way conversations.
I were being interviewed I'd quite happily say things like "At this point, I'd be looking to put caching in. I've used X for this in the past, but does your company have a prefered solution for it?". When I'm sitting in on interviews it's a positive if someone asks me that kind of question.
>Why would interviewers not ask if the candidate is comfortable with whiteboard or a simple paper based or even a oral?
If you're looking for someone who is good at talking other people through their solution, then you want to see them doing it. I've no idea on what this company was actually looking for, but I wouldn't want a technical lead who couldn't grab a pen and draw up their thinking.
comment 10y ago · link · parent
I spend a fair amount of my day job drawing up technical solutions on whiteboards - either helping to analyse a problem, or talking people (often people I've never met before) through my thought process.
For some roles, this kind of skill is absolutely vital. And if that's the role that someone is going for, then you're going to want to know how good they are with it.
It also allows you to see the person's thought process - how do they go about understanding the problem? How do they approach defining the solution? I could be wrong, but I doubt that they'd be looking out for syntax errors on the board - it's far more likely to be communication and structure of thought that they are looking for.
My wife is a teacher. When she goes for jobs, she often has to teach a lesson to a bunch of kids that she's never met before, hasn't got a clue what level they are or what they've already been taught, and with a bunch of observers standing at the back taking notes.
That's not a realistic scenario for the day to day job as a teacher, and doesn't test a fair amount of the other skills that they need. But it allows them to assess whether the candidate can structure a present an engaging lesson.
That doesn't seem entirely unreasonable, and nor does asking someone to talk through a solution on a whiteboard.
comment 10y ago · link · parent
Admittedly, my job may not be typical of what the average dev has to do. But if that's the kind of role that this company was looking for, then asking someone to talk through something on a whiteboard doesn't seem too unreasonable.
I don't know the company, but I'm guessing that they aren't going to be that bothered that you can't remember the exact syntax of a particular function without checking it on Google. What I assume they're looking for is someone who can clearly communicate their thought process.