HNHacker News
TopNewBestAskShowJobs

metaloha

160 karma · joined August 19, 2016

submissionscomments
metaloha··on Angular v17
Chrome, Edge, Opera, and Safari seem to work fine with the playground. Firefox doesn't like it, though. It's the 5th most popular browser (it seems), so I'm not super surprised at that. It works on 92% of the browsers out there (possibly more, I only checked these five), which is GREAT for a beta website. And the message that appears in Firefox does state that support is on its way.
metaloha··on Angular v17
Seems to work fine in Edge, Firefox, Opera, and Safari for me. What's broken for you?
metaloha··on Nit picking in code, doc, and architecture reviews is a waste of time
Exceptions: enforcing code quality that cannot be automated; punctuation in documentation (you WILL use capital letters and periods and complete sentences, so quit complaining about it); encouraging good habits (like using `map` and `filter` and `reduce` instead of `forEach` or `for...in`).

So it's not a waste of time, but pick your battles. Sometimes nits need to be picked so you have some easy-to-grok code and documentation.

metaloha··on Show HN: Generate Skeletons for Tailwind CSS
A couple of examples would not be amiss.
metaloha··on We write JavaScript (and not TypeScript) at Dashcam
This article doesn't really make a strong case aside from "we don't like strong typing."

There's a 99% chance that they have a build process in place already, if for nothing besides minimizing and concatenating their JS files. Adding the `tsc` step is pretty minimal overhead, and all valid JS is also TS; although the language service is going to complain about the lack of types, everything will still work exactly as before.

My argument is that in general, it will cost more in time and effort to add types to a more mature product than to keep them up-to-date in a young product. It's like good comments and documentation - either go 100% or accept that you're going to have a lot of tribal knowledge that is difficult to efficiently disseminate to new employees.

Putting pain off until tomorrow is perhaps good for business, but not for people. Remember that developers are people.

metaloha··on Ask HN / TypeScripters: How Choose JavaScript?
Oh yeah, I'll mention JSDoc @type tags - hard pass, if you can. Comments should have NO EFFECT AT ALL WHATSOEVER on code. They're comments. Everything should be identical with and without them, they are 100% disposable. Moving any type of functionality into comments makes them brittle and now they can't be stripped out.

The suggestion to add a `.d.ts` file is good - it allows people who do use TS to be able to use strong/static typing while using your library, without you needing to add any kind of type support within your library. Just make sure it stays updated ;)

metaloha··on Ask HN / TypeScripters: How Choose JavaScript?
TS helps remove a whole class of bugs (type-related) by preventing you from building (or in this case, transpiling) code with known and potentially unintended type casting (eg. `let myName = "Joe"; myName = null;` This makes it impossible to push production code with these types of potential bugs.

But, you do add a transpilation step you might not have needed (unless you're writing ES6 code and are already using Babel or something to target ES5 browsers).

But, TypeScript is better for adding strong or static typing than anything else, IMHO, so if you need that feature, don't use anything else.

But, it can be harder to write good TS code because JS devs have long been taking advantage of the weak typing inherent to the language. It can be a challenge to change that mode of thinking and resist the temptation to use the `any` type in TS.

As to the list at the link, point 1 is a non-issue; if you're using advanced JS features that aren't supported by the browser, you already have a transpilation step. Point 2 is not a feature of JS, it's a side-effect. Static typing is awesome and (I would argue) necessary for advanced development. Strong typing is a bit of a double-edged sword, but I'd still rather have it than not. Point 3 is related to point 1 - if you already have a transpilation step for some reason and you want strong/static types, no reason not to jump to TS; it transpiles to JS same as CoffeeScript or Flow or JSX.

metaloha··on Ask HN: A payment processor that pre-charges metered use
shrug I don't know how to explain it any better. We want to charge a credit card _before_ the lessons for the month, and the amount will be different each month (either 4 or 5 lessons). Stripe will let us do this _after_ the month (so-called "metered" billing), but not before; they will also do subscriptions but they need to be the same amount for each invoice. So I'm looking for a payment solution that will automatically bill a credit card for a variable amount each month without the client needing to manually enter or approve their payment information each month. It's a subscription where the amount is different each month, and needs to be paid _before_ the service is provided.
metaloha··on Ask HN: A payment processor that pre-charges metered use
This is how music and dance schools charge clients (at least here) - pre-pay based on the number of lessons you will attend this month. What I'm looking for is a way to automate it so we don't need to manually charge everyone's cards individually (and manually) each month.
metaloha··on What is with this sites design
What do you think it should look like?
metaloha··on Show HN: Convert HTML from unsafe inline handlers to CSP-safe external scripts
This goes to a 404 - is the repository private?
metaloha··on Adding Storage to WordPress
WP has custom meta fields already. They're stored in a flat table, not JSON, but are accessible via `id` within the post loop.
metaloha··on Ask HN: How do you set up a SaaS as a solopreneur?
Avalara (https://www.avalara.com/) does tax calculations for SaaS - you give it a list of prices, the address of your customer, and the type of good/service each item is, and it tells you the correct amount of tax to charge :)
metaloha··on Show HN: IntelliPlugin – The Future of WordPress Plugin Development
Not too pick too many nits, but have the code blocks suddenly empty themselves and then fade back in is an annoyance when I'm trying to read the code and see what the plugin does.

Since these boxes are all "below the fold", why have any animation on them or their titles at all?

metaloha··on Show HN: IntelliPlugin – The Future of WordPress Plugin Development
Looks interesting, but please, please, please - those `marquee` banners have to go :(
metaloha··on One Thing Nobody Explained to You About TypeScript
I like to keep test files in the same folder as the thing(s) they're testing. It makes it easy to find specific ones (since the filenames are `utilities.ts` and `utilities.test.ts`, for example) and I don't need to keep extra folders expanded in my IDE's project panel.

https://github.com/metaloha/ts-boilerplate shows an example boilerplate that includes this.

metaloha··on Ask HN: Something that you learnt and made you go Wow
Rice cookers. Damned clever. I wish toasters worked on a similar concept.
metaloha··on Ask HN: Do you know any good web framework performance comparisons?
You could use https://codebase.show/projects/realworld for this instead of writing something new.
metaloha··on Ask HN: Do you know any good web framework performance comparisons?
Ruby is traditionally quite heavy compared to Python and PHP, similar to Java and ColdFusion, though that is likely less a problem these days. I personally have found Flask (Python) to be super lightweight and still has a great ecosystem of libraries and packages.

For the final word in web speed, though, G-WAN - write your code in C and feel the lightning ;)

metaloha··on Ask HN: CSAM Scanning Software Recommendations
In many countries, even an artistic depiction of CSAM is a felony offence, whether it has a basis in reality or not.
metaloha··on Why does JSON.parse corrupt large numbers and how to solve this?
Just a note on the site itself - please don't wreck scrolling and gestures. Whatever library is messing with scroll speed and swiping needs to be removed. The site feels broken when it works this way :(
metaloha··on Ask HN: Resources for learning how to read sheet music
https://ultimatemusictheory.com/free-teacher-resources/prep-...

I actually can't recommend this enough. It's very, very basic, so throw some patience at it (or start with the next book, https://ultimatemusictheory.com/free-teacher-resources/basic... instead). You'll learn to read music, but also to understand it.

metaloha··on Visual Back end As a Service is here
Got some z-index and UX issues on that home page.

The cookie banner appears in front of some text but behind images and some other text.

The drag handle is missing in the whitespace between lines of text (the huge space under "API DEVELOPMENT" for example). It's a large enough space that I should be able to drag the background around, same as outside the text block, and same as the space below "BE THE BRAIN".

The super flashy "for FREE" button also appears half off the side of the viewport in my browser. If it's important, it should be kept on-screen.

Foreground elements should have a blur or fade effect behind them - it's way too easy to drag the background around and make the text completely illegible.

Actually, it's probably better to keep the interactive portion in it's own block and avoid all of those issues completely. Having it as part of the main design is an unnecessary and annoying flex.

metaloha··on Ask HN: Strange audio effect from my mixer, can anyone diagnose it?
From that recording it's hard to tell what's being caused by the speakers and what's being caused by the phone recording and doing it's noise-reduction thing (it sounds like it's recorded with a phone). Can you record the main output of the mixer into a DAW instead and post the MP3 of that? What model of mixer is causing the problem?
metaloha··on Color Formats in CSS
Shameless plug - https://github.com/metaloha/color2color. It converts CSS (and HSB/HSV) color strings into other formats. Lab, LCH, and CMYK are all in-progress and will be added soon. Note that this isn't a polyfill, simply a string converter.
metaloha··on Show HN: Trading cards made with e-ink displays
Trading or collectible card games that have cards that modify themselves with play would be great here. SolForge is the example I'm thinking of, but I'm sure other games do it too.
metaloha··on I love coding but I am horrible at it
This is interesting to me. I think I actually dislike coding but am good at it.
metaloha··on Tesla.com/LICENSE.txt
wtf - why is this in the public folder?
metaloha··on Ask HN: Is it just me?
I've become a professional short-termer over the past 30+ years. I don't think I've stayed with a company longer than 2 years for at least the past 20 or so.

I come in, handle some successful projects (occasionally unsuccessful, such is life) in whatever role (it varies from senior developer to product owner to staff developer to tech evangelist, etc.), then find a reason to move on. I've noticed that the types of companies I work for tend to be grouped - I'll work in legal tech for 2 or 3 companies in a row, then fin tech for a couple, then marketing, then oil & gas for another couplefew, etc. My remuneration has consistently grown as well over that time - I haven't taken a lower-paying position for at least 10 or 15 years now, and only one change that didn't increase what I take home.

I actually didn't realize I was doing this until I started my year off recently and looked back on my career. I still don't know if it's strange or not, but it worked for me.

metaloha··on Is Twitter Breaking?
Twitter was already unusable as a social network before Musk started sinking it.
← PreviousPage 3 of 8Next →