HNHacker News
TopNewBestAskShowJobs

dmux

1,283 karma · joined July 25, 2013

submissionscomments
dmux··on The Modern Java Platform – 2021 Edition
>Java doesn't even support dependency injection, something that I would consider an absolute minimum for even a small project.

For small projects, DI is easy done by passing things via the constructor. If multiple things need to get wired together, pull that wiring logic out into its own class or method (FooBuilder.buildDefault()). If things start to get tedious, that's a really good time to stop and reflect on the design choices. That stop-and-reflect opportunity if often lost when things can be simply AutoWired together.

dmux··on The Modern Java Platform – 2021 Edition
Our team has had a lot of success with both of these too. The single architectural choice I completely disagree with though is their use of Static methods to hook things together.
dmux··on The Modern Java Platform – 2021 Edition
One possibility is that the code is just Java and the end of the day. You could run it independent of Spring processing the annotations.
dmux··on Swift Evolution: Actors
You have to walk a fine line with Akka IMHO. Having inherited and supported an Akka Cluster for 4+ years, I'd strongly recommend that you evaluate whether you really need an Actor based system or if a plain-old set of services talking to each other via a message-broker would suffice.

The particular system my team inherited gave us nothing but issues: cluster coordination issues, so quorum wasn't met and things wouldn't start cleanly, network partitioning issues so nodes would randomly be considered dead, actors "becoming" (the term used IIRC) other types of actors based on messages received... the whole thing was just.. too ephemeral and organic for our tastes. I used to get excited thinking about systems like that, but I've since grown more conservative in my technology / architectural preferences (i.e. choose boring technology). We actually ended up replacing it with exactly what I suggested: a plain-old set of services talking via a message-broker. It's stupid simple and we've all slept better.

Edit: I will say that the use of actors constrained to a single service to handle concurrency is probably way more supportable than in a clustered mode.

dmux··on Kanban board in one HTML using localstorage
PouchDB can be used to solve some of those backing-up and synchronization issues.

https://pouchdb.com/

dmux··on I Really Blew It (2020)
>Perhaps I missed something, but most of my friends have been on the lookout and I have had a number of games referred to me; none of them came close to Balance of Power in algorithmic sophistication.

Isn't this just the "worse is better" principle? Does it really matter if others weren't as algorithmically sophisticated?

dmux··on From First Principles: Why Scala?
>...I've often seen it used to add complexity where none is necessary.

This reminded me of a great blurb about Niklaus Wirth's approach to languages:

>Wirth’s philosophy of programming languages is that a complex language is not required to solve a complex problem. On the contrary, he believes that l languages containing complex features whose purposes are to solve complex problems actually hinder the problem solving effort. The idea is that it is difficult enough for a programmer to solve a complex problem without having to also cope with the complexity of the language. Having a simple programming language as a tool reduces the total complexity of the problem to be solved. [0]

[0] Pg.2 http://www.cslab.pepperdine.edu/warford/ComputingFundamental...

dmux··on Why I still Lisp
Instead of giving the interface an explicit name, I think you could instead use something like this:

    function getEmails(group: Array<{email: string}>) {
        return group.map((p) => p.email)
    }
which leaves the function more open ended than relying on an explicitly named interface that other types then have to inherit from.
dmux··on Visual Tcl
I've never tried it, no. Just something I've read about in the past and it seems like something that could be easily done with Tcl and its "safe" interpreter mechanism.
dmux··on Visual Tcl
I wonder if we'll ever see a middle ground take over where apps are developed in that 90's GUI builder style but instead of purely desktop applications, they're more akin to tiny internet applications like this idea from Rebol: http://www.rebol.com/reblets.html
dmux··on Visual Tcl
>kinda like a Smalltalk

This may be of interest if you find the idea of a live Tcl environment interesting: https://news.ycombinator.com/item?id=22852484

dmux··on Why Clojure? (2018)
>What Lisp helps you is grokking actual operations of computing

Computing in the theoretical sense, right? I've always heard the opposite of this claim: Lisp abstracts away how computation is done on actual hardware. Isn't that what the famous Alan Perlis quote was referring to?

dmux··on Death by 1000 layers: the perils of over-abstraction in Java (2017)
I think this issue stems from the lack of focus on components. To me, if a class is inside the component and has no external visibility, there's no need for it to have an interface. On the other hand, if you're exposing functionality to something "outside" the component at hand, you should definitely be using an interface as you cannot predict the future.
dmux··on Fable 3: F# to JavaScript compiler
Is the term "parenthetical" not common in the UK?
dmux··on The U.S. Divorce Rate Has Hit a 50-Year Low
It would be interesting to get a percentage that are "happily" married vs. married (or stay married) for the tax benefits.
dmux··on Tcl for Web Nerds (2011)
I would also highly recommend Greenspun's Software Engineering for Internet Application ("SEIA") [0] and in particular the metadata section of that book [1] wherein he goes over defining an ontology of a system, implementing a metadata model in SQL and then generating code based on that metadata model.

[0] https://philip.greenspun.com/seia/

[1] https://philip.greenspun.com/seia/metadata

dmux··on Why I'm Tcl-Ish
For those who are web-devs, I'd highly recommend you take a look at Wapp - A Web-Application Framework for TCL [0] by D. Richard Hipp (of SQLite fame). It's simple enough to start with and the source code is a great intro to TCL.

[0] https://wapp.tcl.tk/home/doc/trunk/README.md

dmux··on Ask HN: Best Dev Laptop 2020
I agree so long as you're talking about the new 2020 model wherein they moved towards the magic keyboard.
dmux··on OldVersion.com software downloads for old versions of programs, drivers & games
Slightly related, but I recently had to deal with an old Windows XP machine and with everything moving to HTTPS you're pretty much SOL trying to get _anything_ on the web.
dmux··on Bubble barriers: a smart solution to plastic pollution in rivers
>Does the power consumed by pumping tons of air 24/7 offset the ecological gains by the system?

I was thinking along the same lines. I'm guessing it would be cheaper to concentrate all the plastic close to the source so it can be easily collected. Compared to sending N boats out to M garbage patches that exist, I'm thinking this will be more efficient.

dmux··on Is macOS Becoming Unmaintainable?
>Want to manually scale your display to an exact resolution? Go to Displays, Hold down the option key and then click on the text next to a radio button. WTF!!! Who designed this, this is completely non nondiscoverable.

I agree with the UI discoverability point, but it is called out in the documentation.

dmux··on A Clean Start for the Web
I've not seen PGO before, are you referring to this? https://en.wikipedia.org/wiki/Profile-guided_optimization
dmux··on Guns are selling out across America
I did a quick search for "canoe effect" but didn't find anything that seemed relevant. How's it defined in this context? Spending on outdoors goods are generally increasing?
dmux··on The Common Lisp Condition System – Upcoming Book
Thanks for the reply.

>log all available information about the request and program state to some sort of log file

I've only dabbled with some Schemes, but given Lisp's homoiconic nature, I'm guessing it would also be possible to generate and persist a unit test based on the failing call too, right?

dmux··on The Common Lisp Condition System – Upcoming Book
How would this work for something like an http server? Would a single response block until the issue was fixed?
dmux··on Procrastination Journal
I may be missing something, but why call out the page's source? Were you expecting there to be something hidden?
dmux··on Not a Wheelchair [video]
That was a really heartwarming video. I'm guessing that The Rig has four wheels in order to support carrying things (they mentioned in the video being able to strap a chair or coolers to the back).
dmux··on Entr: Rerun your build when files change
Thanks for sharing this. I'm continuously surprised by how many tools exist in the *nix ecosystem that I've never come across. It makes me question if there's a discoverability problem here. Is there any website that broadly categorizes what utilities are available given a desired goal?
dmux··on Hot-swapping Python 3 code
Tcl as well.
dmux··on Tear Gas Is Way More Dangerous Than Police Let On - Especially During COVID
>The word "chemical" also doesn't mean "toxic".

While that may be true, the definition of "chemical weapon," according to the OPCW does indeed mean toxic: https://www.opcw.org/our-work/what-chemical-weapon

← PreviousPage 8 of 14Next →