HNHacker News
TopNewBestAskShowJobs

hamasho

787 karma · joined December 1, 2021

submissionscomments
hamasho··on Ask HN: Has Google search switched to infinite scrolling for you too now?
My biggest problem with infinite scrolling in general is it clears scrolling state by browser back or page refresh.

Sometimes there's no good result in the first page, or I want to keep searching for more investigation.

When I find a seemingly interesting result after several scrolls and visit the page but find out it's not what I want, I want to go back to the search result and continue. But after browser back, the result is cleared and I have to scroll several times again. Even if I open the result in the different tabs and keep the search result, it may disappear after browser refresh or restart.

hamasho··on Launch HN: Resend (YC W23) – Email API for developers using React
Not 100% but it looks like using ~10% of single core on my macbook too (It's too much for a static landing page). Perhaps it's caused by the black Rubik's cube animation on canvas.
hamasho··on Visual design rules you can safely follow
Probably it's not against shuhari. Shihari is often used to describe professional principles in martial arts or playing instruments. It assumes they're trained to the point where if they do it, they unconsciously follow all the rules. When they play guitar, their fingers just move in the most effective ways and play the most satisfying melody. Then they intentionally break a few rules to improve it.

So shuhari is ”first do it, then do it right, then do it better” for professionals.

hamasho··on Gen Z Netiquettes
I think emojis are an objectively better communication tool. You can pack more emotion and nuances in emojis with much fewer characters. Yet I hate when I see them... Probably because I'm getting older and becoming less tolerant of young culture. Sad

Edit: I added a few emojis in the original message, but it seems automatically removed—another nice thing for hacker news.

hamasho··on Aicracy – Governed by Algorithms

    Previous problems of human bias and corruption thus belong to the past
I hope so too. But in many cases, machine learning based systems just amplify human bias, like ML based hiring systems. After all, it's been trained by using biased data.

    The system is designed according to the human values of transparency, happiness, productivity, fairness, and individuality. Humans can be selfish. Our system can't. 
Hmm. Big if true...
hamasho··on Build ChatGPT like chatbots on your website
(Probably) related discussion.

Natural language is the lazy user interface (2 days ago) https://news.ycombinator.com/item?id=34549378

Chatbot is often a useless, unintuitive UX for solving problems. We already know how most websites work, so it's easier to navigate to the intended resources with a few clicks rather than typing uncertain questions.

hamasho··on Features I'd Like in PostgreSQL
Sounds dumb, but I want JSON field schema validation. I added a JSON column for flexible data, and although I'm happy with its flexibility, I kinda hope I can validate the JSON data structure. Recently I just found an extension [1] and will try soon.

[1] https://github.com/supabase/pg_jsonschema

hamasho··on Facebook drains users' cellphone batteries intentionally says ex-employee
Yeah, the boss didn't care about user's battery.

From the article:

    I said to the manager, 'This can harm somebody,' and she said by harming a few we can help the greater masses. Any data scientist worth his or her salt will know, Don’t hurt people,
hamasho··on Show HN: Git Heat Map – a tool for visualising git repo activity for each file
I love this, thanks!

It would be nice if the heatmap showed addition, deletion, and possibly modification separately. I can't think of suitable visualization methods, but if I can see them individually, it gives more insights.

hamasho··on Russhian Roulette: 1/6 chance of posting your SSH private key on pastebin
I'm already sure that this somehow slips into a dependency of a dependency of a dependency of React, and the world will end.
hamasho··on FTX investor Sequoia removed its glowing profile of Sam Bankman-Fried
For anyone who wants a deeper understanding of the atmosphere, it's good to know that in the series B round, they raised $420.69m from 69 investors. https://blockworks.co/news/sam-bankman-frieds-ftx-raises-pre...

I don't know what those numbers mean, but those investors probably thought it was the funniest thing on earth, and they created history.

hamasho··on Low-quality sleep increases glaucoma risk, new study suggests
Thanks, I'll check them! Those self-improve materials don't always work for me, but sometimes I can find some good points that resonate with my lifestyle. I hope to find them in his videos.
hamasho··on Low-quality sleep increases glaucoma risk, new study suggests
I know low-quality sleep is the cause of a lot of diseases and bad daytime conditions, and still, it's difficult to have high-quality sleep.

It takes a long time to fall asleep when I go to bed, and I'm so bored I can't stop browsing social media, it always ends up with 2~5 hours!

Recently I bought a Kitchen Safe (time locking container) to force me to stop using my phone. And it works! I can't do anything other than sleep. Still, it takes a lot of time to fall asleep, but if I continue this, I believe I can become a good sleeper! (It helps to reduce phone time in general, I recommend it to anyone.)

hamasho··on CS quotes found while browsing Notepad++'s code

  In C++ it's harder to shoot yourself in the foot, but when you do, you blow off your whole leg.

  Bjarne Stroustrup
Is it though? I feel it's as easy to shoot my foot as to modify few lines of C++ code and get 200+ lines of STD error messages.
hamasho··on Focus is saying no to good ideas
I googled the original quotes because I didn't know what it means.

Here are the full quotes:

    “People think focus means saying yes to the thing you've got to focus on. But that's not what it means at all. It means saying no to the hundred other good ideas that there are. You have to pick carefully. I'm actually as proud of the things we haven't done as the things I have done. Innovation is saying no to 1,000 things.” 
https://www.goodreads.com/quotes/629613-people-think-focus-m...
hamasho··on Sound
Lovely article. For interactive reading about sound and music, I also recommend Ableton's "learning synth" site. It leverages web audio capabilities and provides exciting learning resources about how to create synth music. https://learningsynths.ableton.com/
hamasho··on I am endlessly fascinated with content tagging systems
When I started creating a simple blog system as a newbie developer, I needed to design its category/tagging system. Then I was surprised by the lack of good resources on how to design such basic features. I just wanted to know several design patterns and their pros and cons, but I couldn't find any, so I ended up designing my own crappy system.

I hope someone wrote articles on it with actual DB schemas.

hamasho··on QR code images in macOS are silently executed in the background hours/days later
One way to exploit this is to send the QR code through email or messaging app. When I open the email or see the message, the image may be downloaded, scan starts, and it makes requests which expose my information, including IP, without realizing it.
hamasho··on I fooled millions into thinking chocolate helps weight loss (2015)

  “Bitter chocolate tastes bad, therefore it must be good for you,” he said. “It’s like a religion.”
This is exactly what I think too. If I read the fake article, I would easily fail his trap.

Fast food tastes good, and it's bad for health because a huge amount of money has been spent on how to make it addictive. Use addictive and unhealthy ingredients like sugar, salt, and fat as much as allowed by regulation. So it's tasty and unhealthy.

But this doesn't necessarily mean not tasty food is healthy.

hamasho··on Show HN: Rocketry – Statement-based scheduling framework for Python
Looks nice and clean!

Can it support static type checking like mypy? Not only type level like str, but the time format level like “hh:mm” and “n minutes” too.

I hate when I misspell “3 minuts” and realize only after execute it. Much nice if my editor tells me.

hamasho··on I replaced all our blog thumbnails using DALL·E 2
As a programmer, it's my precise job description to "engineer google search terms for information I need."
hamasho··on I replaced all our blog thumbnails using DALL·E 2
First time to hear "Prompt engineering" but I feel familiar with this term. It's my daily job to adjust google search queries to get the information I need, even though sometimes I don't know what I need.First time to hear "Prompt engineering" but I feel really familiar with this term. It's my daily job to engineer google search queries to get the information I nee.
hamasho··on How to buck a tree: Cutting logs for maximum yield (2018)
I'm redesigning my project's architecture and like "Wow! This article is so timely!" It's exactly what I felt too.
hamasho··on Deprank: Use PageRank to find the most important files in your codebase
Great project! I can imagine this helps me get used to new codebases.

As others have already mentioned, it's better if it ranks important files like main.js higher than other util files. models.js and dataUtils.js can be imported from 20 files, but if dataUtils.js is created at the beginning of the project and barely touched since then, it should be ranked lower.

I think it's nice to rank frequently updated files higher, just like real page rank algorithms. If models.js is imported from many files and updated frequently, it should be ranked at the top. main.js is imported nowhere but updated frequently; it should also be higher. dataUtils.js is imported from many files but has not been updated for a long time; it should be lower.

It's much more complicated than normal static analysis. Source code is no longer the single source of truth. VCS' history should also be considered. It has to manage those SEO scammers too. We know those who commit again and again like "Update, Fix bug, Fix typo, Fix lint, Update, Fix format, ..." instead of a single meaningful commit message.

But if it's implemented properly, it helps explore unfamiliar codebases much faster.

hamasho··on GitHub Is Down Again
Even though some languages allow to use UTF-8 characters in the source code, we don't use it other than commenting. But sometimes, it's really wired. If you work in a team with members who don't care about naming, you see some wild variables like this (a little bit exaggerated);

    const CONSUTANTO_1 = 100;
    if (github.isNotWork()) salaryMan.drinkBiilu()
(BTW, it's 7:30 PM and apparently I'm still working)
hamasho··on GitHub Is Down Again
No problem. It's almost Friday's 5 PM in Japan right now.

It's time to stop working and go out for some beer.

hamasho··on Web scraping is legal, US appeals court reaffirms
I understand that some websites are poorly implemented and can't handle hundreds of requests. IANAL, but AFAIK whether it's a DOS attack or not partially depends on the scraper's intent.

In this case, after volunteer engineers invested in their system, it turned out that they created a DB connection after each request, maintained it for 10 mins, and didn't reuse it or close it. So the number of DB connections quickly reached its limitation and couldn't handle the following requests. Similar problems happened with other library systems developed by the same company.

The prosecutors dropped the charge citing his scraping was reasonable, and he didn't have any malicious intent.

hamasho··on Web scraping is legal, US appeals court reaffirms
Every time I hear news like this, I remember this local news in Japan [0].

An old bureaucratic company developed a system for a local library. It was very slow, so a user started scraping it and developed his own library system. A few weeks later, he was arrested.

The system was so shit that it became unusable by only hundreds of requests per hour. The local government filed a claim, and the officer arrested him for the "dangerous cyber attack."

[0] In Japanese: https://www.wikiwand.com/ja/%E5%B2%A1%E5%B4%8E%E5%B8%82%E7%A...

hamasho··on Don't build useless features
> What you encountered sounds like a traditional lack of product management focus

Yeah, you're right. I misunderstood a little that the YAGNI principle can apply to both programming and product management. It was not the devs implementing something unnecessary, but the management wanted unnecessary features at the time.

hamasho··on Don't build useless features
YAGNI is such a great principle. I can't emphasize this enough.

I once inherited a messed-up codebase. The project started to solve the company's internal problem for the sales department, but they also wanted it as a complete SaaS. So the former team implemented features like complex user management, request slotting, billing, etc.

It turned out that it required a lot of development time and money, and if they continued, they would fail to provide essential features to the original customer, the sales department. So they decided to stop implementing features for SaaS but didn't remove them (because we'll need them later! Of course..).

Then I joined the team and helped develop and fix bugs. It was a complete nightmare. Every time I fixed something, somewhere I didn't know even it existed broke, and it somehow affected essential features. No test (because why waste dev time), so I found it in the staging or sometimes in the production (the good thing was, almost no one used it, so it didn't matter).

Most members and the product owner agreed it was better to remove all unused features, but no one didn't want to spend their time cleaning such a mess. So we continued to develop with all unnecessary features, paying attention not to break something implemented long ago, and no one knows why. I left the team and don't know how it goes now.

← PreviousPage 6 of 7Next →