HNHacker News
TopNewBestAskShowJobs

prof_hobart

1,031 karma · joined August 27, 2011

submissionscomments
prof_hobart··on Is Semantic Versioning an Anti-Pattern?
Maybe I'm missing something, but to me more frequent builds make proper semver more important, not less.

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.

prof_hobart··on Master these five concepts to master React
That's exactly what I thought when I started using it.

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.

prof_hobart··on Forget Survival of the Fittest: It Is Kindness That Counts (2009)
It's one of the meanings, and presumably the one that was in mind when the term was coined.

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.

prof_hobart··on Microsoft reboots war on sleep
I agree. The critical question isn't "should I be attending a meeting when I'm walking in the countryside?". It's "what's the alternative?"

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.

prof_hobart··on Biggest Spike in Traffic Deaths in 50 Years? Blame Apps
Unfortunately, the vast majority of people doing it are never spotted by police officers. I walk to work most days, and I can't remember the last time I didn't see at least one person (usually it's at least half a dozen on a 30 minute walk) texting while driving.

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.

prof_hobart··on Falsehoods Programmers Believe About Time (2012)
Not the original poster, but I assume they mean daylight saving. Depending on which kind of clock you're talking about, then for most of the world time goes back by an hour.
prof_hobart··on Esoteric Topics in Computer Programming (2002)
There's at least one on that list that's (at least in my experience) gone from relatively mainstream to esoteric - self-modification.

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.

prof_hobart··on IPv6 Wall of Shame
I get why IPv6 is going to be massively important in the future, but we're not (as far as I know) in that future yet, and these sites aren't going to be dropping their v4 addresses as soon as they get V6 ones, so it's not going to be freeing any old addresses up.

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?

prof_hobart··on The Dropbox hack is real
I do the same, but some companies don't seem to be interested. I've had two different emails linked to a magazine's website and had spam to both.

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.

prof_hobart··on A Message to the Apple Community in Europe
My reading of the ruling is that the EU are saying that it's always been illegal under EU law, but that the Irish government had pretended that it wasn't.

What it looks like they are trying to do is apply a legally compliant level of taxes retroactively, not laws.

prof_hobart··on Apple Plans iPhone for Japan With Tap-to-Pay for Subways
That may be true in some parts, but not everywhere.

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.

prof_hobart··on GM microbes created that can’t escape the lab (2015)
I feel the key sentence is “Our strains, to the extent that we can test them, won’t escape,
prof_hobart··on Users You Don’t Want
This is the exact reason that the Disability Discrimination Act, now the Equality Act, was introduced in the UK (no idea whether there's any equivalent elsewhere). It's illegal to for a business to discriminate their service based on a customer's disability.
prof_hobart··on Only 9% of America Chose Trump and Clinton as the Nominees
If you were using the primaries as a way of predicting the overall winner, the critical word would be "random".

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.

prof_hobart··on 50 Things I Pretend to Know Now That I Am Nearing 50
You didn't make it to

> 48) Physics and most of biology are just opinions that will change every few years.

then?

prof_hobart··on Tesla confirms “Autopilot” crash in Montana
I agree with that, and as I say I'm not attempting to defend Tesla in the slightest.

My point was simply that the driver has to take responsibility for their actions in this situation as well.

prof_hobart··on Tesla confirms “Autopilot” crash in Montana
I don't disagree - like I say, none of my comment was intended to let Tesla off the hook in any way.

My point was simply that the drivers who use semi-automatic cars and choose to ignore warnings to retake control need to be responsible for their actions as well.

prof_hobart··on Tesla confirms “Autopilot” crash in Montana
It's certainly a major fault of Tesla's - if you know it's not safe, you've got no excuse to keep going.

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.

prof_hobart··on Unpleasant Design
I'm not sure that most people would be particularly offended by the fact that it reduces drug dealing, theft, littering etc.

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.

prof_hobart··on My best employee quit because I wouldn’t let her go to college graduation
It's so ignorant and full of "I'm doing something stupid, but the employee was brilliant" comments that I can only assume it was actually written by the employee herself trying to pretend-rationalise her manager's behaviour.
prof_hobart··on Indian phones are weird
I think the problem is that out of the context of the blog, the title makes it sound like it's going to be more interesting to the average reader than it actually is.

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.

prof_hobart··on Is the web dying? The state of affairs in 2016
For me, mobile web and native app are largely solving two different use cases.

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.

prof_hobart··on Just A New Fractal Detail In The Big Picture (2015)
Curiosity in general is probably a fundamental part of human nature.

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.

prof_hobart··on Taking the headphone jack off phones is user-hostile and stupid
Why? There's plenty of rumours that Apple will launch a lightning -> 3.5 mm female for existing headphones to plug into. If they're doing that, there's nothing to stop them creating a lightning -> 3.5 mm male to plug into these kinds of headphone.
prof_hobart··on Taking the headphone jack off phones is user-hostile and stupid
It is, but the equivalent is "people with high end headphones replace their headphone cable all the time".

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.

prof_hobart··on Taking the headphone jack off phones is user-hostile and stupid
>Wire wears out? Replace it.

Is there any reason why a replacement wire with a lightning connection on one end wouldn't be possible?

prof_hobart··on So I refused a white board technical test and was asked to leave
I agree with that.

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.

prof_hobart··on So I refused a white board technical test and was asked to leave
>Interviewers are expecting the actual exact answer with syntax correctness instead of looking at thought process.

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.

prof_hobart··on So I refused a white board technical test and was asked to leave
What's unprofessional about it?

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.

prof_hobart··on So I refused a white board technical test and was asked to leave
If you're in a small company, possibly. In a large organisation, I fairly regularly find myself having to explain technical stuff to people I've never met before. Some are non-technical, some are very technical. Some are external suppliers, or people working in one of our many overseas divisions.

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.

Page 1 of 20Next →