HNHacker News
TopNewBestAskShowJobs

Humphrey

686 karma · joined September 30, 2014

submissionscomments
Humphrey··on Etsy’s Journey to TypeScript
> Does TS happen reduce any of the JS (non-type) craziness as well?

What craziness are you referring too?

Humphrey··on Etsy’s Journey to TypeScript
I think the "week or two" was just referring to updating their tool chain to also include support for TypeScript - not actually converting any code.
Humphrey··on Etsy’s Journey to TypeScript
We've converted most JS projects I work on to TypeScript now, and it is game-changing. Interesting to read how a much larger company did the transition.

Main takeaways from this article that I have also found are:

- Convert your most imported & core code first - it's much easier to convert files which only have TS imports - so start with those, and work out.

- Generating types for API response data has removed so many runtime errors. We generate types from GraphQL schemas.

While learning TypeScript takes time (but not much really), now I am familiar with it, I would code faster in TS than in JS.

Humphrey··on macOS Monterey
Install ShiftIt - customisable shortcut keys for almost all window layout options.
Humphrey··on Google Pixel 6 and Pixel 6 Pro
AND, the day after M1 Pro 7 Max launch. Google Silicon seems so "so what?" after those jaw dropping chips!
Humphrey··on The First Rule of Machine Learning: Start Without Machine Learning
Yes - and after many years, I'm yet to get past this first rule, and actually use ML. One day I hope to have a use case that's worth testing it out on!
Humphrey··on About the security content of iOS 14.7.1 and iPadOS 14.7.1
Yeah, I currently don't have Wi-Fi so my devices have stopped backing up to iCloud. Backups required my device to be plugged into power, connected to power, & have a locked screen! If you do not have Wi-Fi at home, would these conditions ever be met?
Humphrey··on Why did bar ends go away from mountain bikes?
Perhaps there is a place for a bell on shared use trails... but I don't see the need for them on dedicated MTB trails. Riding a bike is loud, so you usually hear somebody smashing down a track faster than you are going. I'll usually say something like "there you go" when the trail straightens/widens to indicate they should pass me.
Humphrey··on Show HN: Control your Bose headphones from your Mac's menubar
> I can't find any mention in the help about selection of two devices, only iteration of previously paired devices.

When a new device is selected, the least recently selected device is disconnected. So once your first device is selected, start cycling again and select your second device. It's just a FIFO (First in first out) queue of devices.

Humphrey··on Show HN: Control your Bose headphones from your Mac's menubar
The Power button. Just push it past the on position.

First slide will tell you which device's are connected.

Subsequent slides will cycle through the device's in what appears to be most recently connected order. Subsequent slides cycle to the next device and when you hear the name you want, stop.

Once device is connected, you can cycle again to select a second device.

Also, since two devices can be connected at once, the device you least recently connected to will be disconnected.

It's super intuitive once you get the hang of it.

Humphrey··on Show HN: Control your Bose headphones from your Mac's menubar
Hehe! I can now understand why you went to th effort of reverse engineering! But yes, just slide the power button past the on position.

First slide will tell you which device's are connected.

Subsequent slides will cycle through the device's in what appears to be most recently connected order. Subsequent slides cycle to the next device and when you hear the name you want, stop.

Also, since two devices can be connected at once, the device you least recently connected to will be disconnected.

It's super intuitive once you get the hang of it.

Humphrey··on Show HN: Control your Bose headphones from your Mac's menubar
I like the idea... But... My QC35ii's already:

- tell me the battery level when turn them on, and the batteries last for so long that they rarely get low enough for me to care what the level is.

- Have a button that cycles through which 2 devices are simultaneously connected. I can't imagine a system menu being anymore convenient than a dedicated button on my ear.

I wouldn't consider buying it unless it changed the deeper settings such as self voice level (I change this often while zooming). That's the only setting that doesn't have a quick shortcut physical button on the device.

Humphrey··on Audacity 3.0
Yes you are correct! My 12 channel mixer (Behringer X12) allows you to plug in a USB disk and record the output. But somebody turned off the mixer while it was recording, which meant that lots of bits of data were written, but the WAV file header was never updated with the size of the file.

So I did another recording to determine the frequency & bit depth, and then opened the dd disk image with those settings. It was pretty obvious from the waveform image which parts of the drive had the recording, and it was perfect.

Interestingly, I got those settings completely wrong at the start, and I could still tell it was music by listening to it, it was just very corrupted sounding!

Humphrey··on Audacity 3.0
While I use Logic for making "real" audio, Audacity is great for those other audio tasks. For example, I used Audacity's "Import Raw Data" feature to open a dd image of a USB drive to recover corrupted audio FTW!
Humphrey··on Firefox 85 cracks down on supercookies
If it still got software updates to Safari, then maybe. But also, browsing the web on my iPad Air gen 1 is pretty painful.
Humphrey··on Python Pip 20.3 Released with new resolver
I was happy with Pip until I spent time in the NPM/Yarn world. Frustrated with Pip I switched half of our projects to Pipenv. However, I found that it struggled to resolve dependencies. Poetry works like a dream now, and life is so much easy now that we have switched all our projects to it.

The methodology of specifying your core dependencies, but also having locked version of your dependency's dependencies works really well.

AND you can easily export to requirements.txt if you prefer to use that in production.

Humphrey··on Tasmania declares itself 100 per cent powered by renewable electricity
Diesel was not the backup plan, but rather unplanned last resort. The back up plan was natural gas, which through a series of unfortunate events was not operational at the time. If memory serves me correctly, they had to organise at great expense to get the diesel generators shipped very quickly from overseas since there was no other option.
Humphrey··on Tasmania declares itself 100 per cent powered by renewable electricity
Great question!
Humphrey··on Tasmania declares itself 100 per cent powered by renewable electricity
Heating in Tasmania is either electricity or wood fire. Wood fire usage is much lower than it used to be as the city I live in the past has given generous grants to replace wood heater with electricity to combat air pollution (it's a valley so all the smoke used to just sit there).
Humphrey··on Tasmania declares itself 100 per cent powered by renewable electricity
Yes, and also all of Tasmania's Hydro generation was built before the whole "green" movement - actually I believe the Australian Green Party started the last time they tried to build a dam in Tasmania in the early 1980's.

Tasmania is also blessed in that Hydro is our "base load" which can be ramped up or down in seconds based on the fluctuating wind and solar generation.

I was driving past some of Tasmania's older dam's today on the way home from a hiking trip and I found myself trying to imagine what the river would have been like if the dam's had never been built. While I am thankful for Tassie's dam's and what they'll mean for our future, it's hard to not notice how much they change the environment.

> They are probably still burning lots of fossil fuels for heating and vehicle traffic.

Car's YES... although I'd say a LOT of people (perhaps most) heat with electricity.

Humphrey··on Bit – A modernized Git CLI written in Go
Atlassian tried to do the GUI version of this with SourceTree. Unfortunately mercurial performance was terrible!
Humphrey··on I built a lay-down desk
I had to re-think "desks" after breaking my collarbone two months ago, and spent a lot of time in my make-shift couch lay-down desk. While I had full control over my lower arm and hand, moving my upper arm and shoulder was painful. The only position I could stay in for extended periods of time was laying down, and I needed to find a way to use both hands without shoulder pain.

On day 2, I discovered that I could spend hours lying flat on the couch with my legs propped up with cushions and a laptop on my 45deg legs. In that position, I could use the computer two handed for extended times as if I didn't have a broken collarbone.

Coming into the office to work (as COVID has been eradicated in my part of Australia) was harder since more than 20mins in an upright position (chair or standing) caused my shoulder to ache.

It took me a couple of weeks to work this out, but I ended up using a large upright shaped bean-bag as my office chair. I could mold the beanbag to give my arm support and sit the more reclined position that re-leaved aches. Having an Ikea standing desk helped, as I get into the bean bag and then lower the desk to match.

It's healed enough now to use regular chair and standing desk, but I learnt a lot about me and desk positions.

My main conclusion (after 15years of having a coding job) is that variation is key. There is no magic seating or standing position. Even if there was, it would be become uncomfortable eventually.

While probably the worst seating position for my back and posture, I have kept the beanbag chair at work, because using it occasionally feels good.

And, when at home I have continued to use the lying flat on the couch position, because again, it's different to how I usually use computers.

Which brings me to my main thought on this project (which I love the idea of): It's too permanent. I'm sure it'll feel amazing and comfy for a few days (or even weeks), but at some point for my body, it'd become just as annoying and uncomfortable as a regular desk.

Humphrey··on Australians stranded overseas as airlines fly with four economy passengers
I don't feel you can blame the airlines for this though - they can't justify operating a flight if passenger caps mean they'll loose money.

Also, most states are now charging approx A$3000 for mandatory hotel quarantine, so returning to Australia is super expensive atm!

Humphrey··on Surviving Django, if you care about databases
History Lesson (if you care about migrations):

TLDR; I disagree: Django migrations are the best, and make reusable apps possible!

I've been using Django since before they introduced migrations and it was hell! Django only had "sync_db" then which would create your tables initially, but then you were on your own to write and run SQL manually for any model changes. This became especially annoying when using 3rd party apps, because if those apps changed the schema, you'd have to manually update your database for the 3rd party changes.

Then came along django-south which was a reusable app which provided migrations and solved all of the above problems. It became almost the standard approach, and third party apps often provided south migrations.

South became so popular, and was such a big improvement to the development workflow, that it's codebase was merged into Django (after making some significant API improvements) to become Django migrations. I can still remember having to covert all the files in the migrations directory from South to Django migrations.

Now we have a defacto standard of migrations work, and they allow easy use of customer SQL. Seriously, if you hate python based migrations as much as the author does, write custom SQL but put it in a Django migration so you get all the benefits of being able to rollback migrations etc.

Summary: when writing all of your own code for a single project then there is only minor benefits from migrations. But they are still worth it! In fact, I write lots raw SQL in my migrations, eg for constraints, triggers, notify, and just modifying my data. If I run SQL, it goes in a migration.

But migrations shine the brightest for reusable first and third party apps, which lets admit, we all use in most projects. This allows a single reusable app to be used for all projects regardless of database. Also, as a consumer of a reusable app, I can let migrations do their thing, and not worry if an update will break my database.

Humphrey··on Node Modules at War: Why CommonJS and ES Modules Can’t Get Along
Wow, I've been coding JS/Typescript frontends for years and somehow completely missed out knowing anything about CJS & ESM or their differences.

I guess it's all irrelevant when you don't use Node, aren't publishing libraries, and are compiling all JavaScript into bundles for deployment and never read the bundled code.

Humphrey··on Gold price rises above $2k for first time
could be worth shopping around!
Humphrey··on Gold price rises above $2k for first time
Absolutely! Although I've been getting closer to 2-3% for gold. Silver though has a much larger spread, the price has to increase significantly to not loose money.
Humphrey··on Gold price rises above $2k for first time
That's a good observation! While not a commodity, I'd just add that where I live (Australia) the price of housing has also been sky rocketing the past few years.
Humphrey··on Gold price rises above $2k for first time
In the modern world people don't buy gold to make transactions but to store wealth. No wealthy person would store their fortune in fiat (paper) currencies such as dollars, but in things with real value such as shares in a companies, property, or other things of value such as gold or silver. At any time these floating currencies can change their value (think hyperinflation, or just exchange rates).

Compared to other "real" things, gold can be liquidated into dollars VERY quickly if you need to make a transaction, and since it's a real thing, it cant disappear.

Also, often gold is stored by the company you bought it from on your behalf, so you can sell it back instantly online. So no need to have to have a home safe.

Also, at an average return of 10%/year over the past 10 years (at least in australian dollars) it's has been out performing many other investment options.

Humphrey··on Moved a server from one building to another with zero downtime
I haven't read the article, but I'm reminded of that episode of Seinfeld and the frogger arcade game
← PreviousPage 6 of 8Next →