HNHacker News
TopNewBestAskShowJobs

Khao

1,010 karma · joined March 12, 2010

submissionscomments
Khao··on Timezone updates need to be fixed
In our case, the admins who create/manage those events have to specify the event location, so we fetch the timezone for that location and if there's any mismatch, they can change the timezone manually. Since we migrated all the data, we have not received a single bug report for an issue that was caused by DST or from converting UTC times to local timezones.
Khao··on Timezone updates need to be fixed
Where I work we deal a lot with events (yoga gyms, community sports centers, etc.) and the old code was saving EVERYTHING in UTC. Every 6 months we'd have some bug report coming in saying that some event was now one hour later or earlier on the website, or in some report, or in an admin edit screen.

I got fed up with this and migrated all the data so it's saved in local time with the timezone information in a separate column. If an admin creates an event for 4pm, we save 4pm with the event location's timezone. Since an event only takes place at one specific location, it makes no sense to have the data in UTC in the database. We can convert to UTC if we want but it's not really useful. The thinking is that if a client is shopping for a class in a different timezone, why would we convert the class's time to the client's timezone? It makes no sense. It's always in local time. This has helped so much.

Khao··on How to avoid common SPA pitfalls when using third-party plugins
The real reason to avoid single page apps.
Khao··on How I built ghit.me, hit count badges for GitHub
Back to geocities websites with hit counters! I like how it was implemented though, I simply hope I won't start seeing this everywhere from now on because it doesn't add anything to a repo to have that badge.
Khao··on WhatsApp is blocking Telegram links
I want something to replace Hangouts, WhatsApp and Messenger and Telegram fits the bill while it looks to me like Signal doesn't. My Telegram account can be synced on multiple PCs and devices, while Signal seems to be phone only.
Khao··on WhatsApp is blocking Telegram links
I saw this pop up on /r/android yesterday and it made me and a couple friends sign up for Telegram, so I guess good job whatsapp on pushing more people towards Telegram. Streisand effect in action!
Khao··on Why CardDAV took so long
I submitted a bug report once and it was fixed the next day, I was invited to try it out on their beta version of the website and it was rolled out on all the servers a couple days later. These guys are truly providing a fantastic service.
Khao··on Cards Against Humanity Has Made Over $54K Selling Nothing on Black Friday
Given how well Cards Against Humanity did in their last stupid sales like that (their first Black Friday was Everything Costs 5$ More!, on another occasion they sold shit, literally shit in a box) I think those numbers are 100% real.
Khao··on Investigating npm3 performance
First of all, npm 2's infinite nesting of dependency was a terrible design from the beginning. It was always broken (This is why on our windows build servers we need to do all sorts of stupid workaround to make npm work). There is no other decent package manager that nests dependencies within dependencies like that, every other package manager out there has a flat structure with packages and their version, so 2 versions of a same package can co-exist with no issues.

By fixing this huge flaw in their design, I thought there would be an increase in performance! In the end, they made it even worse. It makes no sense that fixing their flawed design would result in a 3x worse performance for doing the same task.

Khao··on Investigating npm3 performance
This only reinforces the idea I have that NPM is the absolute worst package manager ever and I wish it would die and people would start using one that works (or building one that works)

A huge regression like that (x3 slower) is not something that should happen from a "mature" project that relases its v3. It's simply inacceptable and it clearly demonstrates that the team behind NPM is incompetent.

Khao··on Project Ballista
Who?

In all seriousness, even if others tried before, they may only have failed because of having no visibility or bad marketing. This has the support of Chromium behind it, so it might be the only key point that would make this viable and adopted widely.

Khao··on Someone bought 'Google.com' from Google for one minute
There are consumer protection laws that protect both consumers and sellers when mistakes are made like in this case (at least here in Québec and Canada, it must be similar in the US).

Let's say you're selling a 10$ gift card on your website but through some bug/error it's now worth 1000$ (an easy mistake to make, just forget the decimal place). What if someone bought the 1000$ worth gift card for the original intended price of 10$? I'm sure you would invalidate that purchase and send them an email explaining that it was a mistake, and it would be perfectly within your rights to do so.

It goes both ways too, if a mistake is made that advantages the seller, they have to fix it.

Khao··on “This mistake will become the thing you are best known for”
I'm surprised I had to scroll so far down to see what this was about.
Khao··on XLParser: A C# parser for Microsoft Excel formulas
With VS Community Edition being free I don't see why developers providing open source libraries should restrict themselves to older versions.
Khao··on Rules for Open Source Success
So what do you recommend? I just open-sourced my first library and I chose MIT licence because I feel it was what was recommended by github when they ask you to choose a licence. I really didn't explore my options much.
Khao··on Git Punish – The Missing Git Command
Because those who comment that it's bad simply missed the joke and are taking this seriously.
Khao··on How Design Works (2012)
This feels to me like design overload. Someone tried to do too much or too many ideas in a single page. I'm with you, I don't like it.
Khao··on Fuckit.py – The Python error steamroller
But this tool is not meant to be used. You should never have to write "import someReallyOffensiveModuleName" because those are jokes not meant to be used at work.
Khao··on Shoco: a fast compressor for short strings
I get negative compression percentage when I put words with "é" in the test box.
Khao··on The Unemployable Programmer
He might have made it look better but it definitely wasn't fake, since he worked at one company I had previously worked at too. We weren't there at the same time but I asked him which team he worked in, who he worked with, who was his team lead, etc.. and he gave me all legit answers. We talked about the processes there and what he liked/disliked since we had both worked in the same environment.
Khao··on The Unemployable Programmer
Some people are terrible at interviews. A few months ago I interviewed a developer in his thirties who had a great looking resume. Worked on lots of big projects in positions of both making decisions about software architecture, technology to use, etc.. and also being a programmer doing the actual work. His resume was really awesome.

When we received him in our interview, we asked him to tell us a bit about his past projects, what he liked, disliked, etc. He didn't talk much and it took us a lot of questions to dig up helpful things.

Then we asked a couple programming related questions and he bombed them all. He couldn't put an algorithm into words, write code that compiles or gives the proper results. Our interview programming questions start very easy and we slowly iterate by adding more constraints that shows if a dev has a deep knowledge of the language and framework.

I have a feeling like this developer was good when he's working alone on a project with no one to talk to. He would have never fit in our company culture and we couldn't evaluate his skills in an interview.

Khao··on Tesla’s Model S Gets “Ludicrous” Mode, Will Do 0-60 in 2.8 Seconds
These people are funding more R&D from Tesla so they can develop their next gen affordable electric car.
Khao··on The View from the Front Seat of the Google Self-Driving Car, Chapter 2
I'd hope the algorithm was designed to crash the car instead of running over a pedestrian. A pedestrian has little chance to survive getting run over compared to a passenger in a car with a seatbelt, airbags, crumple zones, etc.. to protect him.
Khao··on The View from the Front Seat of the Google Self-Driving Car, Chapter 2
Then I trust the safety engineers of that car to have designed a car that will get me out of an accident alive.
Khao··on The View from the Front Seat of the Google Self-Driving Car, Chapter 2
I trust a highly trained algorithm to make better and faster decision than a human driver. The algorithm is even aware of all the cars around it and their speed and can decide to take evasive action with a way better chance of success than I ever could.
Khao··on Find Waldo Faster
In French it's called "Où est Charlie?"
Khao··on Linkmoji – Turn any link into Emoji
Slack converts the ascii emojis to their own images so the links become text with images and you can't click on it or even copy/paste the link.
Khao··on Linkmoji – Turn any link into Emoji
I tried linking to the rick roll video (just as a test url) and it breaks because it seems to lowercase everything.

Original url : https://www.youtube.com/watch?v=dQw4w9WgXcQ

Linkmoji url : http://🍕💩.ws/🍍📦🏂🎈🎾🔑

After following the link : https://www.youtube.com/watch?v=dqw4w9wgxcq

And then you get a 404 not found

Khao··on Exceptional results: error handling in C# and Rust
We don't really do catch-all blocks and our app is monitored on New Relic where we almost always have a 0% error rate (rarely we get <1%, most often related to a new commit that we can fix right away)

The only places where we need good exception handling is when doing I/O (network and filesystem). If you have proper layers to handle those things (with queuing/retrying/logging) you end up with a large codebase with very little places where you have to handle exceptions. Anything that is user-input we use TryParse and we do proper validation on the data before doing anything with it. This method is makes it easier to read because you know what the intent is better than doing parse/catch exception in my opinion.

Khao··on Exceptional results: error handling in C# and Rust
The author is painting a pretty bad picure of C# error handling that isn't close to reality.

In reality, you would never call uint.Parse and let the exception bubble up, you'd call uint.TryParse and handle the logic for failure in the method. There is almost always a way to write your code so it doesn't throw exceptions. I'm working on a pretty large C# codebase for a SaaS website and by doing "find in all files" the keyword "catch" I came up with 174 references. For hundreds of thousands of lines of code, we have had to manually catch and handle exceptions only 174 times.

← PreviousPage 2 of 11Next →