HNHacker News
TopNewBestAskShowJobs

james-mcelwain

663 karma · joined October 6, 2016

[ my public key: https://keybase.io/jamesmcelwain; my proof: https://keybase.io/jamesmcelwain/sigs/whSW5laGmslehwevVkVBiju8T2NK1noZ8yeuyKo2xEo ]
submissionscomments
james-mcelwain··on Public and private class fields
Access modifiers in TS are compile time only checks.

This change is not about visibility in dev tools. I'd imagine you'll still be able to see and mutate private fields in dev console, just like you can in a Java debugger, etc.

This change is for libraries, so that if someone consumes a TS library, for example, they can't monkey patch or otherwise touch private fields at runtime.

james-mcelwain··on DigitalOcean launches its container service
Kubernetes has worked to not be coupled to Docker (http://cri-o.io / https://www.opencontainers.org/), so in a sense, it already is built on top of a "vanilla" container service.
james-mcelwain··on Show HN: Smallest Node.js Docker images
Yup, thanks! Typing too quickly. ^^
james-mcelwain··on Show HN: Smallest Node.js Docker images
`npm` should be included in a final container anyway. Best practices for Docker are to have a separate build and run container. The build container can contain anything you want, but the run container should have only the bare minimum required to execute the artifact produced by the build container.
james-mcelwain··on Google Kubernetes Engine's third consecutive day of service disruption
Right... IMO monolith is better understood as a reference to the data model than deployment topology. If you only have a single source of truth, then your application is naturally going to trend towards doing most of its business logic in one place. This still doesn't displace the need for other services like caching, async tasks, etc., that you identify.
james-mcelwain··on Dictionary Objects in JavaScript and TypeScript (2017)
If you're ok with string keys, you can always do `new Map(Object.entries(obj))`. Alternatively, just implement the `iterable` interface on your custom data type.

Literals are nice sugar, but it hardly seems "ham handed".

james-mcelwain··on Hello P5.js Web Editor
Awesome. Always good to see new stuff from the processing crew.
james-mcelwain··on Dictionary Objects in JavaScript and TypeScript (2017)
JavaScript has a map type that accepts non-string keys.
james-mcelwain··on Plans for the Next Iteration of Vue.js
> I especially don’t get the ide support bit, because Visual Studio Code already does that for regular JS.

The IDE support in VSCode is at least partially driven by type declarations from TS projects, so regular JS is benefiting from TypeScript.

james-mcelwain··on Crafting Interpreters: Strings
This book is the best!
james-mcelwain··on Falling in love with Rust
I'm unsure what "miss" means here. If you forget to add a ?, it's a compilation error.
james-mcelwain··on Amazon is stuffing its search results pages with ads
It's also a matter of degree vs kind. It's easy to say that Google is collecting too much data, but the basic premise of personalizing searches and selling ads is relatively unobjectionable to most people.

Once you've accepted that selling counterfeit goods and other broadly anti-competitive practices are A-OK and part of your core business model, you've crossed a line where it's no longer really a matter of simply doing "less" of it.

james-mcelwain··on Clojure is cool
Seems pretty weird to suggest that if juniors are struggling with one niche language, moving to another would ever be the solution.
james-mcelwain··on Clojure is cool
On the contrary, nil punning seems exceptionally well suited to a dynamic language. In general, I'm only burned by nil propagating into Java, almost all Clojure code seems to handle nil appropriately.

I'm unsure of a good way to represent optionality in a dynamic language without a static type system. Or rather, doing so with the tools available -- core.match vs real pattern matching -- seems rather un-ergonomic.

I'm curious about your thoughts of what would be better.

james-mcelwain··on HUD Files Housing Discrimination Complaint Against Facebook
It is, however, Facebook's obligation to abide by the law, particularly 50 year old laws with decades of settled case law.
james-mcelwain··on HUD Files Housing Discrimination Complaint Against Facebook
The FHA is a 50 year old law. Facebook isn't getting in trouble for offering targeted advertising, they're getting in trouble for allowing explicit discrimination on the basis of sex and ethnicity. This has nothing to do with correlations.
james-mcelwain··on Clojure Error Messages Are Accidental
As someone who has (mostly) struggled through, I'd (mostly) agree. I find that when I am running into errors it is almost always because (a). I am moving too quickly and have misplaced something simple like my parens (which parinfer would probably solve) or (b). am not leaning enough on the REPL and am spending too much time before re-evaluating code.

I find that the more I live in the REPL, the less frequent these errors are.

james-mcelwain··on Clojure Error Messages Are Accidental
Clojure is just so coupled with the host language. Which isn't a bad thing, since it helps make interop effortless, but does make it difficult to appreciate as a standalone language.

I first tried to learn Clojure before I knew anything about Java and things like error messages made it really difficult to get started.

Coming back after having written Java professionally for a year, things like random Java exceptions showing up or long stack traces suddenly became a lot more tractable, although still not "beautiful".

james-mcelwain··on What I Learned Making My Own JIT Language
I thought dense arrays used linear storage and only fell back to a hashmap when they got sufficiently hole-y.
james-mcelwain··on Ask HN: How to find a mental health professional?
Isn't the conclusion here that "mindfulness" is ill defined rather than "just run"? Mindfulness in its most serious form seems to basically be a form of CBT, which may have its own criticisms but at least isn't total snake oil. I don't know about you, but I'm rarely focused on a CBT style practice when running or doing yoga -- they seem to be very different kinds of activity.
james-mcelwain··on Giving Up on the Current MacBook Pro Keyboard
Apple support literally tells you not to use a keyboard cover, which I find kind of amusing given how prone to breakage the new keyboard is without one: https://support.apple.com/en-us/HT203671
james-mcelwain··on What Data Does Facebook Collect When I’m Not Using Facebook, and Why?
Firefox has support for multiple profiles! I have a profile that I only use for Facebook, Gmail, and Twitter, and one that I use for everything else. Probably not perfect, but provides more isolation.
james-mcelwain··on Ask HN: Why does P2P encrypted messaging still suck?
There's a signal electron app, so there's definitely a signal "desktop" app on linux if you want it. I use it every day.
james-mcelwain··on Tesla crash victim had complained about auto-pilot in same location
I love Amtrak and am willing to put up with the delays, but DC to Chicago stop all the time, especially in the mountains, to wait for higher priority trains to pass. Sometimes it's only for a few minutes at a time, but sometimes it adds up to hours.
james-mcelwain··on A picture got my PostgreSQL database to start mining Monero
> But we should not expose anything else that we don't need to?

Yes. Why would you ever need public logins from the open internet to your production database? Even if you need to ability to log in from a random computer, there are better ways, like requiring the use of a vpn so logins are always coming from a white listed ip.

james-mcelwain··on A Clojure learning journey
Fair -- GraphQL seems like something that is particularly well suited to having a Clojure API so that's disappointing to hear it lags behind other implementations.
james-mcelwain··on A Clojure learning journey
It sounds like you're suggesting that Python/Node have better libraries, which couldn't be further from the truth. Most "abandoned" Clojure libraries either (a). aren't abandoned and "just work" due to their limited scope or (b). are wrappers to Java libraries that are trivial or unnecessary. Most people would rather to interop directly.
james-mcelwain··on How and why we moved to Vue.js
I've been having this argument constantly at work. Everyone loves our SPA, but they still want to be able to hire really cheap front-end devs to do maintenance. Having back-end devs do MVC and designers doing CSS and light interactivity is a totally valid model, but doing SPA requires specialist knowledge.

I understand why business people are reluctant to view front-end as a real engineering discipline from a cost-perspective, but trying to get a SPA for a JSP prices is silly and unrealistic.

james-mcelwain··on An opinionated guide to Haskell
I'm writing a lot of Java right now, and it's frustrating that the experience is so horrible on Emacs -- or so much better in Intellij. I tried using Eclim with Emacs for a while, but it's so tedious moving through Java without a specialized IDE. Still, I keep Emacs open on Java code solely for the git interface (magit) and helm integration with `ag`, which I find vastly superior to find-in-path / regex search capabilities in Intellij.
james-mcelwain··on It Was Bad UX, not a “Wrong Button” in Hawaii
Makes sense, but I would hope even the most inept manager could recognize that "AMBER Alert" and "Nuclear Annihilation Imminent" are different degrees of severity.
← PreviousPage 7 of 8Next →