Better HN
topnewbestaskshowjobs
Log inSign up

CodeMage

6,801 karma · joined Feb 26, 2009 (17y ago) · 1,367 submissions

Submissions

comment 7y ago · link · parent

Wow, that takes me back down the nostalgia lane! Denthor's tutorials, PCGPE, Ralf Brown's Interrupt List...

comment 7y ago · link · parent

Maybe it's not the schooling. I went through a similar experience, because I started programming when I was 7 years old. By the time I had learned enough to want to try to make a game, I had taught myself Turbo Pascal, but I still wasn't of an age to learn trigonometry in school.

comment 7y ago · link · parent

> This is precisely what vector::emplace() solves, and std::move should be faster than swap and pop.

The whole swap-and-pop section weirded me out. Maybe I just don't know enough about C++, but saying that assignment (a[i] = a[n-1]) will call the destructor seems false.

As far as I know, the compiler should generate an implicitly defined copy assignment operator for these fixed size PODs and it should be as performant as memcpy.

But again, I don't have years and years of in-depth C++ experience, so I would be grateful if an expert could shed more light on this.

comment 7y ago · link · parent

Same thing in Chile. Some drivers even make sure all the passengers agree on a story to tell the cops if they stop you.

Unlike Colombia, it's not dangerous for passengers -- at least the law-breaking aspect isn't. What's dangerous is how everyone drives. Also, it's a gamble whether you'll get a normal, sane driver, or someone weird or downright crazy. But that's not limited to Uber, you can get crazy cabbies too.

I think the worst experience I had there -- before Uber, this was a taxi driver -- was a guy who: 1) was speeding so much, regardless of potholes, I thought my teeth would fall out; 2) stopped to take a piss in the middle of the ride, without pausing the meter; 3) ended up confessing he wasn't sure where my address was, so I asked him to let me off a few blocks from my place.

Is there a moral to this story? Not really, I just thought I would share something funny ;)

comment 7y ago · link · parent

You can see the same patterns in the society, in the erosion of workers' rights that our ancestors bought literally with their blood and suffering. It's the same force acting on all fronts.

comment 7y ago · link · parent

> So yeah, I detest this sense of entitlement that programmers have, where they want to a) get paid a lot and b) have lots of free time on the side.

That mentality reminds me of the 2014 commercial for Cadillac ELR Coupe: https://www.youtube.com/watch?v=xNzXze5Yza8

It's not entitlement to want work-life balance and be paid well for your skills.

comment 7y ago · link · parent

The sentiments you presented there are extremes, just like your own position is the opposite extreme. The reality, as usual, is somewhere in the middle:

1. Even the best designed and well thought-out coding quizzes are not guaranteed to be a good predictor of the candidate's abilities. And that's when we're talking about the best. A great deal of coding quizzes currently in use are things interviewers came up with because they had to come up with something. So I guess the real sentiment is: coding quizzes need to be crafted and used better.

2. If you use take-home projects in your interview process, you'll invariably be filtering out people who value their free time, regardless of their skills. Put yourself in your candidates' shoes. A typical hiring process is already quite involved. Your candidate has to set aside the time for a recruiter chat, phone screen, a meeting with some of your team, etc. And the vast majority of devs don't get any overtime pay. The bottom line is that free time is extremely valuable. If you're asking your candidates to spend a weekend coding a project for free, be prepared for a whole bunch of them to lose interest and go looking somewhere else.

3. Yes, it's quite reasonable that a candidate with 15+ years of experience doesn't have any side projects to show. I've lost count of things I've played and fiddled with, and then abandoned, because they're simply not good enough to publish. Not to mention that your responsibility for your code doesn't end when you publish it. You're expected to maintain it, keep it documented, bug free, etc. A candidate might not have anything to show because they're "not good enough", but they also might be a mature and responsible dev.

I don't doubt that you've done a lot of hiring and that you're able to find candidates to suit your requirements, but don't fool yourself into thinking that there isn't a whole bunch of bias baked into your process. The fact that this bias isn't hurting you right now should make you question whether today's market really is as competitive as you think.

comment 7y ago · link · parent

Yes, but it's much more helpful -- and less abrasive -- to do so after answering their actual question.

comment 7y ago · link · parent

That's precisely why I wrote "of those who stayed, most had no other choice". I understand the difficulties inherent in moving from one country to another, as I've done it twice now. The difference between changing jobs and changing countries does nothing to invalidate my claim that people can have different motivations and that one of them is "I wish to stay and fight for this cause in this place."

comment 7y ago · link · parent

Why must that -- and nothing else -- be the signal they're sending? People have a variety of motivations.

For example, I left my country 20 years ago because I wanted a better future and I had no desire nor conviction to stay and try to make that future happen there. Of those who stayed, most had no other choice. However, there's a non-negligible number of people who stayed despite having opportunities to leave, precisely because they are willing to fight to make things better.

comment 7y ago · link · parent

I don't think people are having trouble understanding it. I would rather say some of us have a broader view of it.

It's the same old discussion about whether something is right just because it's legal or allowed. Just because a company has a right -- and an incentive -- to do something, doesn't mean that's a morally or ethically right thing to do.

In my opinion, what Whittaker is doing is, in a way, analogous to civil disobedience. And, just like with civil disobedience, reprisals are expected. It's worth keeping in mind that those reprisals aren't automatically right by virtue of being expected, just as her actions aren't automatically right by virtue of being similar to civil disobedience.

In other words, some of us feel we can't afford to, as another commenter put it, "leave your politics at home and let me do my job in peace". I believe this attitude -- that science and engineering should somehow remain orthogonal to and decoupled from ethics and morality -- to be downright pernicious to the society.

comment 7y ago · link · parent

I also came to America legally, and that was the second time I legally emigrated from one country to another. As an "experienced immigrant", I've lost count of how many times I've come upon the astonishingly selfish attitude your comment espouses.

Make no mistake, I'm also against completely open borders without deportation, for a variety of reasons. "Fuck you, got mine" is not one of those reasons.

comment 7y ago · link · parent

I don't think it's revisionism. I think it's an accurate description of the hype that surrounded the gig economy. That's what everyone used to parrot in defense of borderline illegal "disruption" by Uber and such.

To quote Ronald Wright, "Socialism never took root in America because the poor see themselves not as an exploited proletariat but as temporarily embarrassed millionaires." The gig economy is just a new way of exploiting that mindset.

comment 7y ago · link · parent

> The internet was beautiful, information open and available for all.

"Was" is the correct word to use. Here's a fun example: try explaining to someone non-technical why you can't simply download your e-mails. I went through that exercise this morning, when my wife asked me to download a bunch of e-mails and send them to her in a "folder", which she can then send to someone else.

So then I had to explain that GMail allows me to download a single message -- no bulk downloads, of course -- but it saves it in .eml format, which you can't open with programs that come installed on a typical Windows box. And even if you could, there's no guarantee that the guy you're sending them to can.

Of course, she thought that was stupid: why offer saving e-mails in an "obscure" format? So I had to explain why the Internet is now a bunch of walled gardens and closed services, all built on top of open and standardized protocols and formats. And, of course, those open standards can't improve and evolve easily, because each player in the game wants to lock users and their data inside their own walled garden.

So yeah, the takeaway in a nutshell is that the Internet was once open, but then it became lucrative.

EDIT: I think a lot of people replying here might be missing the point. Like I stated above, I was trying to explain the situation to a non-technical person. Yes, I'm aware of POP and IMAP support. Yes, I know RFC5322 is not an obscure format. But I'm talking about people who don't know or care what these things are. Try downloading a bunch of messages in RFC5322 format, zipping them and sending them to your average lawyer and see how they react.

comment 7y ago · link · parent

> I think companies are also free to tell people they aren't welcome if they're going to use that extension.

Or a particular browser. Or a specific operating system. Or the wrong brand of device.

You can probably see where I'm going with that, but in case it's not perfectly clear, I'm trying to say that a company might want to dictate a lot more than just what extension you're using in a browser. Not everyone is going to agree that they are right to do that.

Bear in mind that there's more to consider here than the legality of what they're doing. The openness of the Internet, the interoperability of different operating systems and devices over a particular somewhat-standardized protocol -- these aspects aren't regulated by a law, but they're still important. I'm one of those people who remember the Browser Wars and I don't remember them fondly.

Of course, it's not just about technical aspects, either. There's the whole grey area of whether it's okay for LinkedIn to metaphorically rifle through our proverbial pockets, looking for stuff they don't like and don't want to admit on their virtual premises.

So no, I wouldn't agree that things are as clear cut as you present them.

comment 7y ago · link · parent

We can try, but we won't get as far as you might like. I gave the post a second chance and pushed myself past the point I originally criticized and past all such points.

I could write an in-depth critique of the whole post, but it's 5:30 pm and I would rather focus on finishing my work so I can go home and be with my family.

So instead of that, I'll just give you a summary of what I think about the post:

1) The post essentially compares two different approaches: a specific variant of object-oriented programming and a specific variant of functional programming.

2) There are various points in the post where the author plays fast and loose with definitions of certain concepts, in order to make them fit his narrative.

3) The Socratic dialogue format does not help make the reasoning clearer, it just makes the readers uncomfortably aware that they're being railroaded into reaching certain conclusions.

4) The conclusions reached in the post are a mixed bag of: a) useful and interesting, b) correct but incomplete, and c) correct only under very specific circumstances, rendering them potentially dangerous.

comment 7y ago · link · parent

To be fair, actual Socratic dialogue can be very effective and rewarding, without being patronizing. What you're describing there -- what the blog post is like -- that's just as awful as you said, or worse.

I couldn't get much further past this:

What is an object?

    An object is a set of functions that operate upon encapsulated data elements.
...what?

comment 7y ago · link · parent

> For one, isn't it true that many (most?) doctors in the USA have malpractice insurance? Any lawsuit win against them doesn't make much personal financial difference, just increases medical costs for everyone else as the payment to the 'victim' (not the actual direct victim in this case) is just socialised and dispersed.

Let's say a doctor screws up and you end up having to do an extremely expensive procedure to fix that. Wouldn't winning a malpractice lawsuit allow you to cover those expenses? That's just one of the ways medical malpractice lawsuits make sense.

> For another, presumably the underlying logic of malpractice suits is to punish the underlying error in order to incentivise ... something ... that would prevent a recurrence. Is there any plausible, actionable outcome here which would prevent this type of repeated human error in future? One that that isn't counterbalanced by costs that would yield worse outcomes in other cases?

Honest question: what do you think is grounds for a medical malpractice lawsuit these days? As far as I've been able to figure out, it seems that there has to be some kind of relatively serious, provable negligence involved.

> If so, why are we so sure the courts are best placed to locate and enforce this vs the medical profession itself, which I believe already aims to save as many lives as possible?

I'm having a hard time addressing that idea, because your way of thinking is foreign to me. Look, we are talking about things that seriously screw up people's lives or even end them. To me, your idea of self-regulated medical profession sounds like proposing that, instead of suing the truck driver who ran over your kid, you should let his employer deal with him.

> In the software industry there are no malpractice suits.

Medicine and software industry are not the same thing.

> random people who happened to sweet-talk the court into perceiving "malpractice" vs ordinary mistakes

Well, there it is. You seem to believe that there is no such thing as malpractice, it's all just "ordinary mistakes" that just might end up killing people or screwing up their health permanently.

comment 7y ago · link · parent

> Sorry, where did I say that?

Here:

> would try harder to [...] move to another location.

comment 7y ago · link · parent

> Enforcement of basic car camping and drug possession/use laws has basically gone to zero and as a result there is a sense that Seattle has opened itself up as a "Risk Free Zone" for homelessness.

Again, I find this logic to be extremely confusing. How related is "car camping" to Seattle's homeless? Is there some implication that the majority of them have cars they sleep in? Or am I missing something there?

As for the incentive to follow basic property or drug laws, again, how does that encourage homelessness? I could understand if you argued it encourages crime, but why homelessness?

The only remaining argument is basically "this encourages already homeless people to move to Seattle", which I can see being a problem, but of a different kind. It shares certain aspects with the immigration-related problems: in both cases, it's an effect of a deeper underlying problem that acts as a root cause and should be solved.

comment 7y ago · link · parent

Could someone please explain what it means to "encourage homelessness"? At a first glance, it looks like a passive aggressive implication that homeless people, if they just tried harder, wouldn't be homeless. Can anyone help me see what I'm missing?

comment 7y ago · link · parent

> Edit: The strategy in the paper requires allocating a bunch of physical memory from all the small blocks so that memory allocation requests from a new process are allocated deterministically to a desired physical row.

Honest question, because I'm not a security expert: can you do this without having already pwned your target to such a degree that this would be unnecessary?

comment 7y ago · link · parent

No, I actually misread the comment in question. I thought @dev_dull was saying that people who don't want the government to limit individual freedoms were the same people who want the government to regulate corporations. After re-reading the comment, I can see that this wasn't the message.

However, there's still the fact that @dev_dull is not distinguishing between people arguing about government restricting individual freedoms and government regulating corporations. It's not about whether people can be trusted with high interest cards, it's about whether corporations should be allowed to set any interest rate they want.

comment 7y ago · link · parent

Are you really failing to make a distinction between individuals and corporations? Or is there something in your argument that I missed?

comment 7y ago · link · parent

It reminded me of "Hyperion" and "The Fall of Hyperion" by Dan Simmons. The way an AI called Ummon communicates with humans is rendered in a similar fashion.

comment 7y ago · link · parent

> Having driven both in Europe and the US, this is one of my pet peeves in the US.

Funny, one of my pet peeves since I moved to the US is the "keep right unless passing" or "left lane is for passing only" or any other variation of the same sermon. Sounds logical at first, but it's really bureocracy.

If the highway is congested, then the rule becomes meaningless. The traffic density is so high, that it's perfectly natural to use all of the available lanes.

If the highway is not congested, then the density is low enough that you should be able to change lanes as necessary, with minimal fuss. If that's the case, then the whole "keep to the right unless passing" is really just a crutch. In this situation, what we really want is something along the lines of "pay attention and don't make people pass you on the right", but that's not enforceable. So we come up with a rule like "keep to the right unless passing", because that can be enforced by cops.

comment 7y ago · link · parent

> I think part of the difference in HN opinion color is somewhat related to transparency.

It's not that I disagree with you on the topic of transparency, it's that I think we can't really compare opinions on two very different topics as if they were the same topic. People complaining about too many subscription content providers are not really arguing for or against a monopoly. It's not the same discussion.

> And I'd say Google and Facebook haven't done a sufficient job in proactively informing the public about what they collect, how they generate revenue from it, and what's currently stored about a user.

Granted, but I'm pretty sure that even if they did so, it wouldn't make much difference. I always refer people to Moxie Marlinspike's DEF CON keynote called "Changing threats to privacy" [1]. I would definitely recommend watching it in full, but the key takeaway from it -- for the purposes of this discussion -- is that it all boils down to choice. He talks about the way technology changes the fabric of the society, how it changes the way people interact, communicate and coordinate, and declining to participate in this new way of doing things exposes you to the "no network effect".

This is why it's not enough for Google and Facebook to merely inform people about what they collect and how they use it. As long as they're practically monopolies, they can disclose and inform and then go on just the same, because there's no other viable alternative and they'll work hard to ensure it stays that way.

The traditional way of dealing with an incumbent that is too powerful to reasonably compete with is to break it up, in hopes of diminishing not its power to compete, but rather its power to stifle competition.

[1] https://www.youtube.com/watch?v=eG0KrT6pBPk

comment 7y ago · link · parent

You're conflating way too many things and oversimplifying the whole situation into a fictitious idea of conflicting mindsets.

First of all, you're treating two very different types of services as equal and identical. Netflix and Hulu are subscription content providers. Google and Facebook can be defined and described in many ways, but subscription content providers is not among them [1]. It's quite natural and understandable that people would have different expectations and complaints.

Second, the situation with content providers isn't binary. The solution to the problem of not being to afford a whole bunch of subscription content providers is not limited to having one become a monopoly.

Third, it's not just cost and convenience when it comes to access to content. Take Spotify Premium, for example. It's a subscription service that gives you access to all the music in its catalog as long as you pay your subscription. Except that there is absolutely no legal way for you to ensure access to any subset of the content. Have a favorite song, album or artist? Tomorrow it might disappear from Spotify's catalog and you have no way of hanging on to it.

Fourth, the concerns that lead people to suggest that Google, Facebook or Amazon should be broken up are varied and nuanced, and they go way beyond cost and convenience.

So no, I don't think you can sum up people's opinions into two seemingly contradictory mindsets.

[1] Yes, I'm aware of YouTube and Spotify having a similar model. That actually happens to be a pretty good argument to break up Google.

comment 7y ago · link · parent

> I am in the vast majority (97%) according to this survey:

It's easy to dig up a survey someone did that supports the conclusions you wish were true. It's much harder to find the actual state of reality.

If you click through to their report, you'll realize that there's not much information about their sample, other than this:

From January 14 to February 15, 2019, Malwarebytes Labs conducted a survey on nearly 4,000 participants to measure respondents’ confidence in their own privacy and security practices, as well as their confidence in privacy being maintained by businesses.

There's absolutely no information about the demographic breakdown of the participants and no way to access the dataset itself. In other words, we have no way of establishing that this survey is worth anything more than a blog post on a site that tries to promote its software.

1
111213
46