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

Oh, okay, so we should be fine until the Vogons come.

comment 7y ago · link · parent

There isn't any. This is essentially a thinly disguised ad for Gravity.

comment 7y ago · link · parent

There's are a couple of misquotes there. For starters, it's not "w1 ← w1 − η ∂w|∂L" but "w1 ← w1 − η ∂L|∂w1". Also, the second "if" should say "negative", not "positive" again.

In case you were being sarcastic, it is simple if you don't take it out of context. It requires a certain understanding of derivatives, but a reader who doesn't understand them won't make it to the point you're quoting.

comment 7y ago · link · parent

Since we're doing Slavic languages, let's go with Serbian.

- dog = pas (we don't distinguish between "a dog" and "the dog")

- declensions (singular): pas, psa, psu, psa, psu, psom, psu

- declensions (plural): psi, pasa, psima, pse, psi, psima, psima

- but that's not all, the number can change the declension: 1 pas; 2, 3, 4 psa; 5+ pasa

It's my language and I love it, but the grammar is a nightmare. I think it might be one of the easiest languages to learn to read and write, but good luck learning what it all means ;)

comment 7y ago · link · parent

> Ironically, Knuth's full argument is exactly what we're saying, and what @abraae's taking out of context to criticize.

See https://medium.com/@jaredpochtar/on-performance-and-software... and the full section on https://medium.com/@gabriel_20625/technical-lessons-from-bui...

I read the post in the second link before writing my original reply, because I don't like jumping into a discussion without making sure I understand what's going on ;)

I get that your intention was the same as Knuth's. And yes, I agree that @abraae took your advice out of context. That was, I believe, his point and it's certainly mine.

Specifically, when you look at that numbered list describing your code-writing practices, the numbers 1 and 3 stand out as hyperbolic. People

will* take that stuff out of context and pass it around. Hell, people are already having a hard time staying reasonable in this very discussion thread.

I can't speak for anyone else, but don't take my comments personally. You guys made your own product and ran with it, which is more than I can say for myself, and I respect you for that. I also agree with what you're trying to say. However, I stand by my criticism of the hyperbole, because I've seen people who take that stuff too literally and proceed to write crap.

comment 7y ago · link · parent

> You're not making games, you're selling entertainment. Focus on the latter first, and optimize accordingly.

I agree with that. And yet, Minecraft is possibly the worst example:

- It's an exception to the general wisdom that games do have to worry about performance in order to deliver fun. Just because Minecraft became popular despite it's abysmal performance, doesn't mean games can get away with that in general.

- Notch never expected Minecraft to become that popular. In a sense, Minecraft was an accident.

- Minecraft's performance was so bad, a lot of people had to install a mod called OptiFine just to be able to play it on their hardware.

comment 7y ago · link · parent

> I would love to get all these "Performance First! Its so easy" engineers in a room for a week.

Except that's not the argument in the comment you're reacting to. Here's what the comment actually said:

> Anyone with a reasonable amount of experience is often able to look ahead - well before any code is written - and see how performance could be better if road A is taken instead of road B.

In other words, some optimizations come with no significant cost. As a banal, perhaps exaggerated example, if you're writing code that needs to store data in a collection and you know that it's going to perform random access to that data on a regular basis, you're not likely to pick a linked list over some kind of array.

What @abraae is criticizing is the practice of asserting "best practices" that are likely to be taken out of context, widely propagated and misinterpreted.

Knuth's famous assertion "premature optimization is the root of all evil" is an excellent example. People love quoting it, but few seem to take into account the context, to the point that it has been largely forgotten. Here's the quote in its context:

Programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%.

To be clear, it's not Knuth's fault that people are taking his very rational and sensible advice and reducing it to "yeah, you should totally disregard performance when first writing your code". This is not about pointing fingers and assigning blame, it's about being responsible when offering advice. Knuth's advice was reasonable and nuanced, and it still got taken out of context and reduced to something different and arguably harmful. Now look at Gabriel's advice, which is arguably a lot easier to take out of its context and misinterpret, and imagine the consequences it could have.

That is what @abraae is reacting to.

EDIT: There's another thing that really, really bothers me about your reply:

> Rule #1 of any business: Sales cures all.

This, right here, is what I personally feel is wrong with software nowadays. It's how we end up with poorly written, bloated, bug-ridden, unstable, unreliable, insecure crap that we end up using anyway, because there's no better alternative.

comment 7y ago · link · parent

Off topic: I loved the Top Gear homage in that one.

comment 7y ago · link · parent

That slight wobble in Earth's orbit we're experiencing, that's Dijkstra rolling in his grave.

All joking aside, programming should be treated a lot more like engineering and a lot less like craft. Yes, it does have aspects of both, but neglecting the engineering aspects of it is proving to be increasingly harmful to our end users.

comment 7y ago · link · parent

> The problem with this story is that it's more about an abusive boss at Amazon than Amazon.

No, the author lists a whole bunch of names from HR. That's not just an abusive boss, that's an abusive boss protected by HR, which makes it a story about Amazon.

I worked at Amazon and never had any issues like that. In fact, my experience was completely opposite and I had several wonderful bosses, great co-workers, awesome environment and fun things to work on.

I'm certain there are many stories like mine. That doesn't matter at all, as long as there's one case like Oleg's.

comment 7y ago · link · parent

Let's not engage in doxing here.

comment 7y ago · link · parent

> They are both self-made success stories. Schwarzenegger even moreso than Gates.

That second part is precisely my point. They're both self-made success stories, but they are in no way equal. They're both self-made success stories in the sense that a dolphin and a cat are both mammals.

> If you come from nothing, i'd say getting into any of those professions more than qualifies for "making it".

I would like you to closely examine what you said and the way you said it. I will give you the benefit of the doubt and assume that you just didn't pay a lot of attention to what I wrote, rather than ignoring it and cherry-picking parts to focus on.

The inequality in United States is very, very pronounced and it's getting worse with time. The "self-made success" trope, which involves treating different self-made success stories as equal, is a way of defending and perpetuating that inequality.

People who are getting more and more oppressed by that inequality are rallying against the use of that trope.

Yes, I agree with your definition: an individual that exceeds the median success level of their peer class group can be, under certain circumstances, be defined as a "self-made success".

My point is that it's just a definition. What people are arguing about -- in general, not just this article -- is not really the definition. Rather, they are arguing about the concept in its socioeconomic context.

Which brings me back to what you said about "making it": if you come from nothing, then just having a well-compensated profession is qualifies as "making it". Is that self-made success? Because that's the topic of our discussion here, remember?

Sure, you could just repeat your definition and say that both "well-compensated professional who came from nothing" and "Bill Gates becoming a billionaire" are examples that fit the definition and that you're just stating facts and that there are no value judgments involved. In which case, you're just nit-picking the article and not making a useful point at all.

Or maybe you just took issue with the literal words I used to describe the American Dream and are nit-picking those, outside the context of the rest of the sentence, or indeed the rest of my comment?

The truth is that the discussions about the "self-made success as a trope" are not really about the clear cut definitions. It's turtles all the way down, in the sense that almost everyone relies on other people in some ways, so arguing about the precise definition of "self-made success" is a bit pointless. The discourse is really about the role of the trope in the growing inequality in this society and, to that purpose, arguing about some of the most common abuses of the trope -- like this article does -- is much more useful.

comment 7y ago · link · parent

> I feel like this trope that self-made success is a myth comes almost entirely from people like the author of this article. People who were born with lots of advantages, who still couldn't hack it. They want to justify their own failure to live up to their family's expectations by tearing other people down.

And there we go. That kind of attitude is why this trope was created initially.

The problem people have with "self-made success" trope is that the self-made success story of someone with severe disadvantages is being equated, on an astoundingly regular basis, with the success of people with substantial advantages. That's how Bill Gates and Arnold Schwarzenegger are both dubbed "self-made" successes, despite their rather different histories.

Even worse, it is being used to justify, defend and perpetuate inequality, by convincing everyone that the American Dream is that "anyone can make it". After all, if such-and-such person coming from dirt poor origins could become wildly successful, anyone can. Therefore, we must strive at all costs to avoid removing "incentives" that motivate people to reach for that elusive success.

Naturally, this will generate resistance, and rightfully so. Despite the endless propaganda that permeates the fabric of our society, the self-made success story of Bill Gates is not the same thing as that of John Paul DeJoria.

So yeah, I agree with you in one aspect: the self-made success is not a myth. It's something much worse -- it's propaganda.

It brings to mind that quote by Anatole France: "The law, in its majestic equality, forbids the rich as well as the poor to sleep under bridges, to beg in the streets, and to steal bread."

comment 7y ago · link · parent

Is there any place where I can find a comprehensive list of countermeasures to stop Google from recording and analyzing all the stuff that the article lists? According to the article:

It turns out they record and analyse:

- Your computer’s timezone and time

- Your IP address and rough location

- Your screen size and resolution

- What browser you’re using

- What plugins you’re using

- How long the page took to display

- How many key presses, mouse clicks, and tap/scrolls were made

And ... some other stuff we don’t quite understand.

comment 7y ago · link · parent

There are several solutions that occured to me off the top of my head, here's the simplest one:

    try:
        method1()
        return
    except Exception: # or a more specific exception type
        pass # try the next method
    try:
        method2()
        return
    except Exception:
        pass
    # ...
    try:
        method10()
    except Exception:
        raise NoMethodWorked()
Seriously, there are so many ways to solve this in a readable, maintainable way, without resorting to introducing weird new syntax.

comment 7y ago · link · parent

Both checked and unchecked exceptions are typed in Java. Unchecked exceptions are not included in the method signature, but that doesn't mean that the exceptions are untyped.

comment 7y ago · link · parent

I see a lot of commenters here are as perplexed as I was when I first read this post.

The key thing to understand here is that post is really about an attempt to implement the "Railway Oriented Programming" paradigm [1] by Scott Wlaschin, but in Python. I would suggest reading the Scott's post on ROP and at least skimming the video before going on.

So ROP is, as Scott himself states, a way to take all those nice Haskell concepts and techniques and apply them in F# in a way that won't overwhelm those who are new to them.

The problem with the original post is that it presents two problems with exception in Python and then offers the "returns" library as a solution which, ultimately, doesn't end up solving either of those problems.

The first problem the post describes is that the exceptions are not part of the function signature. The second problem is that exceptions are essentially gotos and that this makes reasoning about the execution flow very difficulty.

To tackle both problems, the returns library offers its own implementation of the Either monad in form of the Result container. Having presented that solution, the post promptly decides that monadic code in Python is unreadable and offers the @pipeline decorator which allows you to write code that looks imperative, which partially defeats its purpose as a solution to the problem about the flow reasoning. I say partially, because it replaces implicit gotos with implicit returns, which is a marginal improvement over exceptions.

The post then decides that using the Result class in the signature is also ugly and offers the @safe decorator which allows you to write the same code you would write without ROP, but now it wraps everything in Result behind the scenes. Even worse than that, this produces the return type of Result[whatever_your_success_type_is, Exception]. For those familiar with Java, this is very similar to putting "throws Exception" in your method signature, except that it's hidden and implicit.

I'll end this with a bit of advice for the author, preceded by an apology, because I'm not sure if I have managed to find a way of phrasing it that doesn't sound harsh. You might want to do some serious reading about functional programming and monads and how these concepts have been carried over into and grafted onto mixed-paradigm languages like Java. I mention Java specifically, because one of the complaints in your post is that Python won't be supporting checked exceptions in the nearest future. A lot has been written about checked exceptions in Java -- on both sides of the discussion.

[1]: https://fsharpforfunandprofit.com/rop/ [2]: https://en.wikipedia.org/wiki/Tagged_union

comment 7y ago · link · parent

Thank you for helping me realize what's been bothering me about software for the last decade or so. I've been experiencing an increasing apathy and dissatisfaction and I kept attributing it to "age" -- 40 is not that much, true, but I had no better hypothesis until now.

Basically, what bothers me is that most of software being developed nowadays treats users like shit and the excuse is always along the same lines: "We ensure that we do what users want, by measuring their response, and if they didn't like it they would use something else".

Turns out, you can't go anywhere else if everything is corrupted through same perverse incentives and you don't have the power to change it yourself. Back when most users were more computer-savvy, the users had more power. Obviously, we can't go back to computers being mostly a hobby for geeks, but there has to be some kind of a solution to put more power in users' hands. I just can't think of one.

comment 7y ago · link · parent

It's clear from that same introduction paragraph that the focus of the studies is pretty narrow and excludes a whole slew of factors that would normally be considered extremely relevant.

comment 7y ago · link · parent

Thank you for explaining this. I had no idea banks charged a fee to Visa and MasterCard; for some reason I thought it was the other way around.

comment 7y ago · link · parent

Could you explain this a bit for those of us who don't know in depth how this works? For starters, what's a payments acquirer? Also, due to inherent ambiguity in English, I'm not sure whether your point #1 means that my bank imposes an interchange fee on Visa/Mastercard or whether they impose a Visa/Mastercard fee on someone else (and who it would be).

comment 7y ago · link · parent

If I had to pick TL;DW relevant to this topic, it's that the choice of platform is aggregate, not individual. If the vast majority of people stop communicating or interacting in one way and start doing it in another, it's not really a feasible choice to opt out anymore.

This is my own very clumsy summary. I strongly recommend watching the video, because Moxie is much better at explaining this than I am.

comment 7y ago · link · parent

> There are plenty of alternatives to social media - email, SMS, phone calls, and even decentralized options.

I suggest watching Moxie Marlinspike's keynote for Defcon 18: https://www.youtube.com/watch?v=eG0KrT6pBPk

comment 7y ago · link · parent

Deniability is not the same as privacy and can't be used to replace it.

comment 7y ago · link · parent

> Politics has the force of law behind it, cryptography has irrefutable mathematics. Let's see who wins.

In the end, force wins. Irrefutable mathematics are just a tool. Every right we have has been won through struggle. Sometimes that struggle is non-violent, sometimes it's less so, but it's always a struggle. A lot of people tend to forget that and think that technology will magically solve things. Or if not technology, something else or someone else will do it.

comment 7y ago · link · parent

You're not confused, the article is confused. It boils down to a gripe against the suffix "-punk" and it tries to make some connection between that and the lack of originality that is to be expected when art meets mass-market.

comment 7y ago · link · parent

Is it me, or is this an article with a sensationalist headline with a really inconclusive body?

comment 7y ago · link · parent

I guess I wasn't clear about my stance: I can't fault their grievances, but I can and do fault their methods. I'm pretty sure that obtaining the government permit didn't involve the constituency. There are ways of responding to that, without resorting to crime.

comment 7y ago · link · parent

They're not going on a crusade against self-driving cars, but against the "beta testing" of self-driving cars in their neighborhood, without their approval. It says so in the article, although it's a bit buried. I can't really fault them for that.

comment 8y ago · link · parent

Based on my brief stint in the game development industry, it seems that there are two major obstacles that keep artists from adopting Git. One is the tooling: most of the tools artists use have integrated support for Perforce. This problem is not trivial, but it's something that could ultimately be overcome.

A much bigger obstacle is the workflow. The reason why coders can work with a DVCS is because merging in other people's changes is something that can be clearly defined and executed. When it comes to assets, there is no clear definition of whether and how you can merge changes. It's not even clear for which kinds of assets diff and merge are concepts that make sense.

There's a lot of work that could be done there, but it doesn't seem like it will be done any time soon, mostly because game development is one of the most single-minded fields in software development industry; the only thing that matters is momentum and meeting the deadlines at all costs (witness the latest Rockstar Games controversy about 100-hour weeks) and everything else is secondary.

1
131415
46