HNHacker News
TopNewBestAskShowJobs

hxtk

508 karma · joined August 12, 2015

submissionscomments
hxtk··on Is dark matter made of primordial black holes?
I haven't studied astronomy as much as I would like, so this is probably a stupid question, but is it possible that something other than star collapses caused a bunch of anti-matter in the early universe to form black holes, both explaining dark matter and answering the question of "where did all the antimatter go?"
hxtk··on Right Click
There's a cycle in the 20 questions game that allows you to gradually fill your entire screen.
hxtk··on Ask HN: How to self-learn electronics?
I started with EEVBlog, especially "Fundamentals Friday" and the series where he designs things. Next, I turned to the textbook at AllAboutCircuits.

Next thing I did was design and build a DC lab. I bought my meters and scopes outright, but designed and built my own DC load and power supply. Since I'd already watched Dave's videos about them on EEVBlog, they were obviously influenced by his design, but I made a couple of non-trivial changes to the spec so that I'd have to make my own design decisions. I found this electronics stackexchange post very helpful for heat dissipation calculations [0]. Also, while it's very simple and not suitable for complex or precise work, Falstad's circuit simulator was very helpful for experimenting [1].

My next step was fixing things. This gave me an opportunity to do a bunch of things:

* Become familiar with ICs. At first I always had to look up the number on every IC I saw to figure out how it was supposed to behave before I could test if its actual behavior matched, but over time you'll start recognizing those numbers and understanding why it was chosen over another component that does the same job.

* Drawing schematics. Debugging is really hard without a schematic, so on anything remotely complex, my first step was often searching for a schematic. This search often came up empty, so my second step would be following all the traces and looking up all the chips so that I could draw a circuit diagram and figure out roughly what I should expect.

* Soldering. This should be fairly self-explanatory.

Frankly, I haven't gotten past here yet. I'm not terribly good with AC theory or RF stuff. I came to this thread looking for recommendations on that part, but I don't think there's any reason my methods so far wouldn't work; I just haven't had the time.

[0]: https://electronics.stackexchange.com/questions/55513/can-a-...

[1]: http://www.falstad.com/circuit/

hxtk··on Google Adds 'Kodi' to Autocomplete Piracy Filter
For what it's worth, unfamiliarity might have something to do with the fact Kodi has only existed under that name for a couple years.

Prior to that, it was known as XBMC ("XBox Media Center"). Under that title it's been around since 2003.

hxtk··on Ask HN: What is your favorite pocket knife?
I always carry the RSK Mk1, which is Doug Ritter's take on the Benchmade Griptilian.

I picked it because I like drop point blade geometry, it's heavy-duty enough to chop with in a pinch, like all high quality pocket knives it holds an edge very well, and it's at the upper limit of how big a knife can be without being uncomfortable or inconvenient to carry in my waistband.

hxtk··on Show HN: Enlight – Learn to code by building projects
Would running inputs through a markdown engine on the server side fix this, assuming it didn't break some other design requirement?
hxtk··on Project Euler
#601 is pretty easy. Also, #512 and #521 if you have some background in prime number theory.
hxtk··on Project Euler
> Some problems can even be solved without any programming.

Here's a fairly comprehensive list of those problems, but it hasn't been updated in a while, e.g., 601 is solvable with pencil and paper but it's new enough that it isn't on the list.

https://projecteuler.chat/viewtopic.php?t=1982

hxtk··on Going beyond the idiomatic Python
Not only is it not idiomatic; it's functionally incorrect.

An iterable containing `[]`, `None`, or any other value that is false in a boolean context would return true. They've assumed that `(0 -> false) -> (false -> 0)`, which is simply not true.

Even if you're dealing with a context that cannot pass in an iterable with non-zero "falsy" values then it needs to be explicitly documented. At that point, why not "document" it by being explicit with the code. This is how I'd do it, but I feel like it could be made cleaner:

    def contains_zero(iterable):
        return any([i is 0 for i in iterable])
Edit: I forgot how to python. It's `return 0 in iterable`.
hxtk··on Show HN: 300k lines of Java UI code running as JavaScript in browser
I'd imagine it's a large codebase and they're trying to maximize the number of people that can access it while minimizing the number of supported browsers. There are very few platforms where firefox is available and Chrom(e|ium) is not.

FWIW, it actually does work on Firefox Quantum; it's just not guaranteed to work.

hxtk··on Refresh Is Sacred
"It just works" is great and imo arguably the ideal design in a lot of use cases. The problem here is that the code wasn't adequately tested. It "just works" in the circumstances that the app designers thought of when they were making it, and it "may or may not work if you're lucky" the rest of the time.
hxtk··on Refresh Is Sacred
I thought about outlook, too, but for the opposite reason: their web client overrides ctrl+r, making the way I force a refresh incongruous with the rest of the web.
hxtk··on A method for improving Milky Way exposures in light pollution
People actually used to do this. Back when most street lighting came from sodium lamps, you could eliminate light pollution almost completely with a pair of glasses intended for soda-lime glass blowing.
hxtk··on A method for improving Milky Way exposures in light pollution
Have it trigger on a voltage threshold. 3 phase means you're hitting 0V 6x per cycle so that'd bring the pwm up to 720Hz.
hxtk··on Run your own OAuth2 server
It seems like the simplest thing, then, would be to use a secret that is too short in your documentation and make note of both the fact that it's too short and what the requirements are for a good secret.

Of course, this runs the risk that a user will simply "salt" the sample you provide up to the necessary length, which makes the length of their secret effectively the difference between the minimum length and the sample length.

hxtk··on Fucking Sue Me (2011)
> "definition of done"

My first programming job had exactly this problem. Spec started at "connect these two services together using webhooks for $700" and creeped its way up to "build a database-backed web service that replaces both of the original services and then some for $4000, plus development expenses."

It's still not done. It'll never be done. But thankfully, I got out after it was off the​ ground and someone else maintains it now.

hxtk··on Weird Python Integers
I don't think that it was a specific design decision to make '==' be a pointer comparison instead of value comparison. It's simply a consequence of the much more general design decision that operators cannot be overloaded.

`a==b` is always an analog for the C code `a==b`, not `* a==*b` and certainly not C++'s `operator==(a, b)`

hxtk··on Why is this C++ code faster than my hand-written assembly (2016)
Just say it's for Project Euler. That way they just accept that any optimizations you're asking for actually need to happen.
hxtk··on Kids Pass Just Reminded Us How Hard Responsible Disclosure Is
I'm currently working for a real estate startup and I have to seriously twist their arm to convince them we should authenticate private api requests at all, let alone run vulnerability testing.
← PreviousPage 6 of 6