HNHacker News
TopNewBestAskShowJobs

shaftway

2,241 karma · joined May 6, 2015

submissionscomments
shaftway··on Ask HN: Share your AI prompt that stumps every model
I've heard the answer is "he could cut a cord of conifer but it costs a quarter per quart he cuts".
shaftway··on SerenityOS is a love letter to '90s user interfaces
> Remove the animations or make them faster (you can do that sometimes), and the lag may become apparent.

This is my number one trick on Android phones. Enable developer options and change the animation speeds from 1x to 0.5x. It makes your old phone feel new.

shaftway··on How to bike across the country
I did the same. It took a couple days to get used to it though. It would throw you off balance on turns.
shaftway··on How to Bike Across the Country
I've done a much shorter route, but still long with a similar amount of preparation - Port Angeles, WA to San Francisco, CA

I can not recommend it highly enough. It took us 2 weeks which is a much more reasonable amount of time to take off. I wasn't really prepped and not in great physical shape, which made it more difficult, but it was so rewarding. That route is very popular and there are hiker / biker camp sites every 30 miles or so. About half the people you see each night are going the same direction as you, so you probably saw them last night.

I would strongly recommend the paper maps from ACA. They are fantastic, and you can get a holder that goes between your handlebars. It's really hard to use your phone as a GPS when you're out of power.

I also broke a spoke on my wheel and it wasn't a very common wheel type. The person I went with had to go 20 miles back to a bike shop and ended up buying me a whole new wheel. So getting bog-standard equipment is very helpful.

shaftway··on Actually drawing some ovals – that are not ellipses (2017)
FWIW, here's the bezier algorithm in Python:

    def bezier(t, *handles):
        """Computes a single point of a bezier of any order where 0 <= t <= 1."""
        if len(handles) == 1:
            return handles[0]
        else:
            pairs = zip(handles[:-1], handles[1:])
            return bezier(t, *[_bezier_interpolate(t, a, b) for a, b in pairs])


    def _bezier_interpolate(t, a, b):
        return [a * (1-t) + b * t for a, b in zip(a, b)]


    assert bezier(0.25, [1, 1, 1], [2, 2, 2], [3, 4, 5]) == [1.5, 1.5625, 1.625]
You can pass it any order of bezier (cubic, quadratic, etc.) for any number of dimensions, and how for along the interpolation you are. It will give you a single point. Connect a bunch together to get your curve. You can actually stop when `len(handles) == 2` and you get line segments instead of points, but it's slightly less accurate.

You can see the math for computing a point (or segment) is trivial (addition and multiplication) and it can be easily parallelized. It can even be a one-liner, but that isn't very readable.

Here's a good website for visualizing the math: https://www.summbit.com/blog/bezier-curve-guide/

shaftway··on Actually drawing some ovals – that are not ellipses (2017)
This is how SVG and most other drawing programs are implemented under the hood.

Down at the lowest level the engine can only really do straight lines. You may ask for a circle or a bezier, but the engine only approximates this with enough fidelity that you wouldn't notice the flaws. Beziers end up being approximated as a bunch of tiny line segments. Circles and ellipses can be approximated pretty easily as a handful of beziers.

Beziers are particularly useful because they have some handy properties. You don't need to do any trig to calculate them (like you do for arcs). They're extremely simple to compute, and any bezier curve can be split into two smaller bezier curves. That last fact makes it easier to have varying fidelity along the curve.

Source: was on the original SVG Working Group team @ Adobe.

shaftway··on Are Levi's from Amazon different from Levi's from Levi's?
I know this is only a sample size of 1, but I get my Levi's from the outlet store. I got two pairs of 531's about 6 years ago and basically lived in those two pairs. I wasn't sliding around on the ground, but I was doing woodworking so they took a beating and got pretty dirty. I just took a look at them and they only spot that even looked worn was at the top of the seat, right where 4 seams come together. Otherwise nothing. I only replaced them because I dropped 4 inches off my waist and they'll just fall off me now.
shaftway··on Google will develop Android OS behind closed doors starting next week
The real hidden gem in that deal would have been keeping Motorola's cable set-top box. It owned more than half of the cable box market, and would have been an opportunity to push YouTube TV and Google TV into the hands of the majority of the market overnight.
shaftway··on The great Hobby Lobby artifact heist
Every time I've shopped at a Hobby Lobby, I've gotten a weird feeling that there's something else shady going on. They don't use barcodes to price any of the goods. Everything has a sticker on it, and the cashier types up everything by hand. Your receipt ends up just being a list of dollar amounts and a total, nothing identifying your purchases in any way.

I just assumed that they're doing this so they can falsify audits. Similar to how they purchase land and donate it, claiming a bigger tax write-off, I assume they're doing the same with their merchandise. How could you audit it if there's no real stock tracking system?

shaftway··on Two AI agents on a phone call realize they're both AI and switch to ggwave
I've gotten calls asking if the business (not a restaurant) was going to be open on a holiday. It was clearer than a typical person calling, quick, and easy to confirm. I'd rather take these calls than actual people.
shaftway··on A drill bit that can also drive screws
I don't think the screw is biting into any material. You can see the screw drop pretty far into the hole. Keep in mind it isn't counter-sinking the hold at all. I think he's driving the screw into the substrate and setting it deep enough that it looks countersunk and isn't loose.
shaftway··on A drill bit that can also drive screws
> I prefer round shank with flats

Try getting a quick-change chuck and this opinion will change.

shaftway··on A drill bit that can also drive screws
I've got a Shaper that I use for some projects, and I went this way with spindles for it. I picked up three extras, and one spindle is permanently 1/4" downcut, one is 1/4" upcut, one is a 1/4" bowl bit, and the fourth is for whatever else I need, but I haven't taken the V-carve bit out of it yet. Extra bonus, the first three are all dialed in to the exact same depth, so I don't need to re-zero the Z on the tool.
shaftway··on A drill bit that can also drive screws
> I'd use that thing at home for light duty stuff

I know he's drilling into hardwood, but look how hard he has to press to drill into it. Doesn't look particularly light duty to me.

> having a quick change chuck

This is the way. Under $10 at Home depot for one of these and you can swap 1/4" hex shank bits in less time than you can say "swap 1/4 inch hex shank bits".

shaftway··on Polish city is using mussels to monitor water quality (2020)
Yeah, I've heard that ABA is for the parents, not for the children with autism.
shaftway··on Everyone knows your location: tracking myself down through in-app ads
The mobile ad industry is weird, and has some perverse incentives. Good games don't advertise (they don't need to). Games that hook the users just enough that they can show them more ads tend to plow that money right back into advertising to get more users. Those are the ads you see 99% of the time, and they're not really targeted. They're just people who know that the average 15 second interstitial will net them $0.006 in revenue, so they bid for it at $0.005.

Are there whales that spend $1m / day in advertising. Absolutely, 100%. Are they running at all times? No. We typically see that kind of spend from a single advertiser around 30 days out of the year. They're short campaigns, typically around a launch of a big title, and they always try to target as narrowly as they can to maximize their impact.

You're right about it using IP geo-location to guess where you are and what language you want. We also use that to determine if we should show you the GDPR disclosures. But try looking at ads on a Xiaomi phone versus a Samsung and you'll see a different set of ads, because one of those purchasers tends to have more disposable income.

shaftway··on Microsoft Is Dead (2007)
I haven't been issued a company laptop that wasn't OSX since 2009. Nowadays everyone makes a big deal about having the latest Apple M7.2 silicon.
shaftway··on Microsoft Is Dead (2007)
Of the recent places I've worked, both use it. Block was at ~14,000 employees, but I think they're currently at ~12,500. My current company uses it, and we're ~2,000.
shaftway··on Everyone knows your location: tracking myself down through in-app ads
I'm in this industry, and I have knowledge about this.

It's important to point out that it takes a long time for uptake of new versions of ad SDKs. The general assumption is that it takes about 6 months after release of a new version for 50% of ad traffic to come from that version or newer. Also, for every version you release, approximately 1% of traffic will never upgrade past that version.

In that kind of world, over-collecting data makes sense, especially if you think nobody will ever find out. Like total / and free disk space. There's no good reason to need those, right? But let's say an advertiser comes to you and says "we want to spend $1M / day to advertise our 10GB game, but only to devices that could install it." All of a sudden it's useful to know that a device only has 8GB of disk space, or only 100MB of free space.

So OK, if we didn't collect disk space, now it makes sense to collect disk space. Let's add it to the SDK. It takes a month or two to release a new version of the SDK. 3 months to get any meaningful traffic from it, and another 3 months to get up to 50% of your traffic. Assuming the ramps are linear, 4 months of 0%, and then 3 months of ramping to 50%, 30 days per month, you'll make $22.5M in the first 7 months. But if you had the logic in there to begin with, you'd have made $210M during the same time period. That makes it an easy choice for the business folks.

There are answers to this, but they all have drawbacks. You could limit data that ad agencies can collect. This reduces the value of ads. And agencies have learned that some data (like location) is low-value and high-risk, so they're removing the ability to supply it. I think it'd be better to support a model where ad code can be updated independently of the app. This way we could push out bug fixes faster, and could remove our just-in-case collection, but Apple has no signs that this is coming soon, and Google's answer has been such a shit-show that we aren't considering it viable over the next 4 years.

Edit: To address screen brightness specifically, it's a very rough proxy for age of the user.

shaftway··on Polish city is using mussels to monitor water quality (2020)
Fun fact, this is the same Skinner that eventually wrote the book on modern autism treatment, aka Applied Behavior Analysis.
shaftway··on USDA ordered to scrub climate change from websites
Don't Look U̶p̶ At CO2
shaftway··on Cc Hot Wife: Gmail exposes contact names
I was bit by this really hard.

At some point in the past, while we were dating, I had my wife's phone and changed my contact name to something far more risqué than "Hot Wife". I called her, she saw it come up, we laughed, she changed it back a few days later.

My primary email address was <[first].[last]@gmail.com>. But somehow this name got associated with <[first][last]@gmail.com>. Google notoriously ignores dots in your email address most of the time, but apparently not all of the time. Google Contacts does all sorts of magic when merging multiple contacts as one. Structurally my wife had two contacts for me with different email addresses, but the UI was merging them into a single display contact. Since we used the form with the dot in it, nobody noticed....

... until about 10 years later. We were now married, had kids, and we're in the process of interviewing to hire an au pair (a live-in, foreign exchange nanny). My wife emailed a prospective au pair, the agency, and CCed me, but fat fingered the email address without the dot.

We were dropped by the au pair agency and had to go with a different one.

shaftway··on A layoff fundamentally changed how I perceive work
You forget over time, and obligations grow.

My first layoff was rough. It was in '00 and I was 21, so I didn't have too many obligations.

My second layoff was in '23 and I was 44 with kids and a mortgage. It hit me a lot harder.

My third was in '24, but I had learned my lessons and had positioned myself better, so I wasn't as badly affected.

shaftway··on A layoff fundamentally changed how I perceive work
I was laid off twice, about a year apart. Both affected me deeply, and clearly in a traumatic way. The last one was about a year ago.

My spidey-sense has been tingling for the last couple weeks, and there's a vesting cliff coming up, so I've been looking at my manager's calendar for suspicious upcoming meetings. I figure there are 8 potential firing days left (Mondays, Fridays, and regular 1:1 meetings) until that cliff, and then I can relax.

One of the things that has helped me cope is to constantly be interviewing at smaller companies. It's a lot less stressful to be laid off when you already have another offer on the table.

shaftway··on A layoff fundamentally changed how I perceive work
I don't even put education anymore.

I dropped out of university, so in my early years it took a lot of tuning my resume to give the impression that I had a degree without actually saying it. Thankfully I had taken summer courses at a different, nearby university for two years before college. Eventually I would just put the years, the universities, and the major I was pursuing. Now I just leave it off the resume.

I had one manager who found out after the fact and told me he wouldn't have hired me if he realized, but he was glad he did.

I had an interview where they asked for a college transcript and then grilled me on why I failed Martian Geology and why I only got a C in Vector Calculus. I was given an offer, but declined it because of that experience. I dodged a bullet too; I've seen reports that the company sues former employees just to cost them money.

shaftway··on Two Hard Things (2009)
I've always liked the version where there are 3 hard things:

  1.) Caching things
  3.) Race conditions
  2.) Naming things
  4.) Off-by-one errors
shaftway··on GitHub Git Operations Are Down
As someone who found out that way twice in the last two years, I also thought I had been let go. Anxiety is a hell of a drug.
shaftway··on 28h Days: year 1 update
I did one of the more extreme sleep schedules for a little over a year. Generally I was happy I did it, and there are tons of times that I wish I could again, but external pressure prevent me from doing it again.

I always try to dissuade people from it. It's difficult to get into, and difficult to maintain. It plays hell with a social schedule where people expect you to be awake at certain times.

shaftway··on I've acquired a new superpower
This happens to me too. Particularly when it's on a narrow horizontal repetition (like wooden slats on a wall).

I attribute mine to playing a lot of the game Magic Carpet from the mid to late 90's. It had some interesting graphics modes, including Red/Blue anaglyph 3D and a stereogram 3D mode. It was fun to try to play it, but it used noise for the pattern, so you didn't get textures, only blobby shapes.

shaftway··on The Two Rules of Software Creation from Which Every Problem Derives
One of the lessons I learned early in my career was from the Mythical Man-Month, about building a pilot system. It's often paraphrased as "you're going to throw the first one away".

I think this is the bridge between waterfall and agile that deserves more attention. Use agile methodologies to build a prototype (or multiple small prototypes). Figure out what works, what doesn't work, and what you'd do differently if you were starting from scratch.

And then start from scratch.

With the experience you've obtained you'll know what you're building, and have your waterfall specs.

← PreviousPage 5 of 28Next →