Recent submissions

Comment · 6 years ago
I bought a copy of "Auto Mechanics Fundamentals" based on this thread and I think it is definitely the book you're remembering. The exploding can image you describe is on page 9 and the first chapter builds up an engine from first principles like you've talked about. Thank you for recommending this, it's a great resource!
Comment · 9 years ago
Depends on the context/language I think. Splitting a block of code into a function gives it a greppable name that (ideally) succinctly describes the point of the block. You can have that block just headed by a comment inline to try and do the same thing, but comments are extremely prone to getting ignored and left to grow outdated when the purpose of the code around them changes. It's easier for the reader to just mentally abstract away that block if it's separated into a function. And if that block is worth testing, it's much easier to do when it's isolated into its own function.

There's reasons to keep the block inline too--like if you're working in a more resource constrained environment, or if the block isn't really isolated/self-contained enough to cleanly abstract away, or if the block in question isn't really doing anything substantial. But I wouldn't say that you should only abstract away code into functions to save yourself from literally copy/pasting the lines in multiple places.

Comment · 9 years ago
bargl asked aantix permission to directly quote them without the intro further downthread: https://news.ycombinator.com/item?id=14395143

>Do you mind if I word for word quote your above to see if I get downvoted too? I want to repost with just the last two paragraphs to see what happens. I'm curious how this post would have been received without the intro.

Comment · 9 years ago
Of course, that's not what I'm trying to argue against. The fact that the city is vastly underpopulated per square mile is arguably one of the core sources of its public infrastructure issues. What I was trying to say is that there's still ~700k people already living there, who have been living there for decades, but the angle of a lot of the "Detroit comeback" press is to focus entirely on how happy the new transplants and the surburban visitors are, and on their wants/needs, and to ignore the hundreds of thousands of people that have remained in the city this entire time. I'm speaking in generalities of course, but anecdotally it's an angle that I've seen come up in a lot of the press cycles about new developments in the city.
Comment · 9 years ago
Yeah. I think we're on the same page. I think the flashy Greater Downtown development is generally positive, I don't mean to be down on it--that would be especially hypocritical of me, as a former Midtown young adult transplant--it's just that a lot of times it's portrayed through this lens where it's as if the city was this completely empty and barren wasteland and here is this new artisan coffee shop charging into the wilderness to save the world and Establish Civilization. When the city is not an empty wasteland. There are hundreds of thousands of people already living there, they've been living there for decades, and a fancy bakery is nice but probably isn't going to help them with any of the public infrastructure issues they've been actually struggling with and trying to get attention to for years and years now.
Comment · 9 years ago
I lived in Midtown for ~5 years in 2010. I've heard it described by disillusioned longtime residents as "two cities" at once--there's the flashy Greater Downtown developments that suburban outsiders and young transplants take advantage of--the million and one microbreweries, the great dive bars and concerts, the locally grown organic handmade (artisan shop|bakery|barbershop|restaurants), the low (if rising) rents, the incredible art museums, etc. There's brands like Shinola that completely base their marketing off the image of an "authentic", scrappy city fighting back, even.

But the actual longterm residents, especially the ones living in the vast majority of the city that falls outside of the Greater Downtown area, still have to deal with trying to commute with DDOT, the abysmal public infrastructure, and the horrifically underfunded public school system, etc, and those multifaceted and crippling issues don't see the same kind of widespread attention/praise/improvements because there's no sexiness there and no short term money to be made off of it. And no easy answers, either, it's not as simple trying to fix public transportation in the city as it is opening a coffee house on Palmer. There's attempts being made, but at least anecdotally they don't seem to generate the same press or have the same kind of investment behind them.

I don't think it's as simple as whether or not the city is coming "back"--there's a lot of layers to that. "Back" by what definition, and for who?

Comment · 9 years ago
Can't chime in on safety issues, but on usability: I know a physician who transitioned to using EMR roughly five years ago. It doubled the amount of time they need to take notes, to this day. They can't see nearly the same amount of patients they used to because so much of their day is spent going into and out of full screen surprise submenus in the EMR software and flipping through different tabs and re-entering information into multiple forms and scrolling through dropdowns with multiple hundreds of options. GP's post is 100% believable for me. It's nothing like Rust vs C89. It's more coding with punch cards vs an IDE, except the EMRs are the punch cards.
Comment · 9 years ago
Agree in a lot of ways, but there's darker sides to this pro depending on context and who you are. One of the things that makes the Bay Area priceless to me (visibile minority) is that I'm consistently treated like a regular person/with friendliness by strangers instead of with general hostility/coldness like I was back home in the Midwest.
Comment · 9 years ago
I'd second that the game is good enough to warrant a Switch purchase on its own, assuming you have that disposable income.

[BOTW puzzle spoilers below]

Comparing it to the Witcher 3 is actually a great way to highlight its strength--the insane depth of the mechanics. It feels almost like you're playing Nethack or Dwarf Fort in terms of how deep the mechanics go and how much the game designers allow you to do. Not _as_ deep, nothing's as deep as Dwarf Fort, but deep enough that I can make the comparison.

For example, both TW3 and BOTW have a mechanic where you can mix different ingredients together to give yourself stat bonuses. They both have you harvest the ingredients from the in-game world. Very similar so far. But in TW3, you mix them by going through some menu screens and clicking on the appropriate items. In BOTW, you take the items out of your inventory, hold them, and return to normal gameplay while holding them and can then choose to drop them anywhere in the outside world (ideally in a heated cauldron). But you can choose to drop them just in an open flame, and while you can't get potions this way, you _can_ cook ingredients like apples and meat to have them restore more of your health. But if you leave them in the fire too long, they'll catch fire themselves. And if it's a dry day and you're standing in the right (or wrong) kind of terrain, the grass underfoot may catch on fire, too. And it may spread (and start interfering with enemies--but that's another story). And there's more to it than that--if you drop certain ingredients in snowy landscapes or icy streams, they'll freeze over and give you heat resisting properties when they didn't before. And if you drop them in areas that are too hot (think side of an active volcano), they'll start cooking immediately, as if you had dropped them over an open flame in a standard area. You can distract certain a certain type of enemy by dropping food in front of it too.

The entire game is like this. For example, in another dungeon I got stuck on a puzzle that clearly wanted me to put two magic electric orbs on two switches, about 5m apart from each other. But for the life of me I could only find one of the orbs. After fifteen minutes of running around, I remembered that my metal weapons conducted electricity--I had found that out because I had gotten killed by a lightning strike while I was flying through a storm earlier, I ignored the warning sparking around my back and had to reload a save. So I dropped every metal weapon I had and dragged in a metal chest from another room in the dungeon and made a circuit from one switch to the other with the single electric orb in the middle. And it totally worked to solve the puzzle. (Looked up where the second orb was later and I was blind to not notice it, whoops.)

It doesn't have the depth of writing that TW3 does, the characters are more cartoonish and less nuanced and the plot itself is much more straightforward and doesn't have a tenth of the subterfuge. But the writing isn't poor, either, it's done extremely well for its style. It comes across as very Ghibli-esque to me. Zelda's character in particular is nuanced and an interesting examination of their old tropes without fully subverting them, and the way they reveal the story to you is through a series of clever small vignettes that overwhelmingly choose these small intimate moments that manage to imply so much more than they outright say.

It's unabashedly 11/10 GOTY and maybe "game of this generation" to me, though I'm trying to give myself some time to get over the initial rush before I make that kind of call. Blows TW3 out of the water, and I loved TW3.

Comment · 9 years ago
Comment · 9 years ago
>You could have made the same inane argument for all the uneducated factory laborers who have been replaced by machines.

There's nothing inane about the argument. Have you ever been to Detroit? I've lived there for years. It's a horrible thing for these people to have been replaced by automation in their lifetimes. They didn't see the benefits in the increased productivity like their employers did, they just lost their livelihood and had to scramble for jobs that paid much less while simultaneously trying to retrain into other fields, if they were enterprising. The entire region is obviously devastated from the effects of it. Their prior automated work being "unfulfilling" and therefore terrible is a) debatable and b) nothing compared to the struggle of having no income at all. One guy I knew ended up homeless after he lost his job, then with a leg amputation because of frostbite from sleeping outside. When I met him he was making a living ticket scalping in his wheelchair all day. The short term consequences are real and terrible for these people.

Comment · 9 years ago
This is really impressive. I check out code poems occasionally and I don't think I've ever seen ones where executing them actually draws images related to the subject matter of the text itself. Love the piet one sort of doing it in reverse especially. Thank you for sharing.

Here's another old famous example of these for anyone interested, "Black Perl" (https://en.wikipedia.org/wiki/Black_Perl)

    BEFOREHAND: close door, each window & exit; wait until time.
        open spellbook, study, read (scan, select, tell us);
    write it, print the hex while each watches,
        reverse its length, write again;
        kill spiders, pop them, chop, split, kill them.
            unlink arms, shift, wait & listen (listening, wait),
    sort the flock (then, warn the "goats" & kill the "sheep");
        kill them, dump qualms, shift moralities,
        values aside, each one;
            die sheep! die to reverse the system
            you accept (reject, respect);
    next step,
        kill the next sacrifice, each sacrifice,
        wait, redo ritual until "all the spirits are pleased";
        do it ("as they say").
    do it(*everyone***must***participate***in***forbidden**s*e*x*).
    return last victim; package body;
        exit crypt (time, times & "half a time") & close it,
        select (quickly) & warn your next victim;
    AFTERWARDS: tell nobody.
        wait, wait until time;
        wait until next year, next decade;
            sleep, sleep, die yourself,
            die at last
    # Larry Wall
Comment · 9 years ago
I was just thinking of its rogue mode. I remember each person having their own cursor and being able to work independently in the same session with it.
Comment · 9 years ago
Not on its own, but I've used https://github.com/zolrath/wemux on top of tmux in the past to get that and it's worked well.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton