skysight-inc/HackerNews huggingface dataset:
> 1. The power is dissipated across the internal resistance of the power source. Just make sure you are using a power source which can handle the heat (and current) and you should be fine.

This is totally wrong.

Suppose you approximate your power supply by its Norton equivalent circuit (the Norton equivalence is exact, but the power supply is probably nonlinear at some point). You have an open-circuit voltage V_s and internal resistance R_s. A good power supply will try to keep R_s small.

Now you plug this power supply into a battery that currently has voltage V_b and internal resistance R_b. You seem to be assuming that R_b=0, which is odd.

The current I = (V_s - V_b) / (R_s + R_b). For many power supplies, R_s and R_b are quite low, and if you have V_s = 20V and V_b = 3V (which would be the case for your average laptop power brick and a partly discharged single-cell or parallel-connected laptop battery), you get 17V / (R_s + R_b). For common power bricks and batteries, R_s + R_b is very small and I ends up being rather large. If you set R_b = 0 (as you did), then you're nearly short-circuiting your charger and expecting it to dissipate the resulting heat.

If you change your scenario a bit and imagine a tiny USB-C phone charger at 9V or 12V and a phone battery at 3V, you're going to melt your charger. And your hypothetical design completely ignores the battery's preferred charging current, which I can pretty much guarantee you'll exceed.

As a real-world example of how wrong you are, go get a 9V battery and a little 3V lightbulb. Connect them, cross your fingers, and imagine that light bulb will run correctly and all that excess voltage dissipates in the 9V battery. (And don't hold the light bulb with your bare hands while you do this, please.)

Fortunately, chargers don't work like this. But please never design a power electronic circuit.
Purely out of interest, because I might have used one without even realising it, but could you link some desktop applications written in Java that haven't been sluggish as hell or a bit broken feeling?
I'm quite a big fan of OPs work and I think that if they take some time with JavaScript they will change their "Let me be clear about this: JavaScript sucks. It’s not the worst, but it’s also not by any means good" opinion.

Check out JavaScript the Good Parts. It's a great language hidden under a layer of horrible horrible design choices.
what is electron?
Here's a Unix Humble Book Bundle:

https://www.humblebundle.com/books/unix-book-bundle
No, I think you're misinterpreting the comment. Django guides you the right way and how it guides you works most of the time. However, when you do hit the edge, Django's very well written docs and thoughtfully designed architecture guide you in building around its limitations. For example, if you want to swap in Jinja over Django templates or SQLAlchemy over Django ORM. Really needing to do so is still the exception to the norm, but just know that Django does more here than most other frameworks.

If you are interested in understanding this a little deeper, I highly recommend picking up the Two Scoops book [1].

[1]: https://www.twoscoopspress.com/products/two-scoops-of-django...
>Electron allows the world's most popular layout system (HTML+CSS) to be used with one of the world's most popular programming languages

Just wanted to name the most obvious alternative: embedded browser component like QtWebKit, which allows to code most of the application logic on the language of your choice. Embedded browsers are the way people have been doing it since circa 2000 (by then, Windows was dominating platform and you could use embedded IE for rendering - the typical app size was much smaller than 200 Mb btw). I remember earning some money on a side project around that time - the CD catalog of bathroom equipment, which I implemented by borrowing huge part of my customer's website and embedding it in CBuilder app with few improvements for richer UX.
Thanks for that pointer! I've been off Firefox for the past six months since they broke my private feedreader extension[1]. I'd been using Opera but I'm typing this out on qutebrowser.

[1] https://news.ycombinator.com/item?id=11287049
This makes no sense and completely disregards context.

There are perfectly valid use cases for Electron, and they have absolutely nothing to do with what you said. There are also insane amounts of cross-platform native code written on platform abstractions layers.

> Developers are so into code sharing, write once run everywhere, that they don't stop and ask if they should.

Isn't that the very purpose of Qt or GTK which the article is promoting instead of Electron?
Did you get downvoted as I did?

Are you guys seriously proponents of centralisation and useless intermediaries?
What is the problem to take a 10$ stm32f discovery board and use it as TPM. There are different flash protections:

1) you can read/write flash via JTAG

2) you can only write flash, but not read the old one

3) you can't rewrite flash, neigher can you read it.

You will still have to implement USB communication, but there is already a lib from STM for it. Some models also have generous flash (in MB ranges).

You can use internal SRAM which is more than enough and use AES acceleration peripherial. One can attach sdcard and use SPI + DMA + AES periherial to shuffle data along if one needs alot of storage.
Yeah no. Electron is fine to write desktop apps.

I've seen native app with more ugly UIs and being laggy, etc... For many apps Electron is fine and will perform as well, or even better than native apps (just because, developers you know).
And yet the League of Legends client was rewritten from AIR to HTML+JS on top of Chromium...
Thanks, we updated the title from “MacOS 10.12 Open Source” a while ago.
Thank you! That clears it up. I wasn't getting that it had the whole run-time with it, and that it was so extensive.
nation-states had the power of bulk collection and bulk processing 30 years ago, the difference is now you don't need a human to copy the data to a disk and walk off with it.
Smartwatch powered by your body temperature – Matrix PowerWatch
Not specifically, just shopping.google.com. I try to check there if I don't think the prices at my normal outlets are good enough. For instance, I needed some bags for my vacuum cleaner a while ago, and they were too high at both the manufacturer's site (Bissell) and at Amazon. There were off-brand bags at Amazon for less, but the reviews were terrible. So I think I looked on Google shopping, and ended up finding a great price for the OEM bags at target.com. While I was there, I got some dental floss that works well for me, because it was also really cheap there.

In another example, my now-ex wife wanted some specific sea salt from Italy that she likes a lot for some reason. Amazon's price was very high, so again I used Google (I think, this was probably a year ago) and found a site that specialized in Italian food imports. They had dirt-cheap prices for the stuff if you bought it by the case, so that's what we did, plus a bunch of other pasta stuff that was really cheap.

There's tons of specialty stores out there like that that you just have to look for, depending on what you're looking for. shopping.google.com frequently points me to good places, but also just a regular Google search, or a search on DDG will frequently be productive. Even other big-name retailers will frequently have good deals, better than Amazon: walmart.com, target.com, etc. But it all fluctuates and varies a lot, so it is a bit of work to find good deals. But generally, once I've found a good supplier for something I repurchase at some interval, it usually works out best to keep buying from them, so it's frequently worth the time investment to find a good supplier. Then I just keep all my email receipts tagged "Purchases", and then do a search through those when I need to re-order something.
Show HN: A visual guide to the most popular CSS properties
I dislike JS just as much as the next guy but the only real contender on the list is Qt. Which you need to license for commercial development. Furthermore, even though I like to think that I'm ok in C++, I would really think twice before using it on my next project these days.

The JS performance issues should go away for the most part when wasm is standard. Also a lot of people write some compile to JS language, not JS, so I think that most of the points of this blog will be rendered moot in the near future.
I disagree, the first case study app revealed flawed logic. lossless-cut is a _visual_ tool for trimming videos. Author derides it by comparing it to the underlying ffmpeg command but that misses the point entirely: I can't magically divine where the start and end is. I need to see the video to determine the times. This tool provides an easy way to see the video and step until I find the right start and end points. There are plenty of frontends to ffmpeg that do similar tasks, and I really wish the author explored some of them to see how they compare to the electron solution.
This is a great point to call out.

Cities don't like to be seen as anti-technology which is why you don't see a massive crackdown on AirBnB and Uber. But if one big city decides to do it, it can give other cities enough cover to do it as well.

As you said, suddenly AirBnB's growth goes positive to negative.
You need to write it in Java? Which is the considered one of the worst language of the new generation.
> It's 2016, people, the ship has sailed on pretending JS isn't a real programming language. Phrasing the argument the way he does just betrays his smug elitism.

Using the date as an argument is also poor form. JS is a terrible programming language (I'm not denying that it is a programming language though) regardless of how popular it is (although I think I might be going against the grain here on HN, many people here seem to enjoy node.js).

> The fact is, for many types of applications, Electron is a really good fit: for example, shipping a single-page webapp as a desktop app, a need that surfaces often in today's world, despite his derision of this concept.

I feel it's unreasonable to turn a single web page into a desktop app by bundling an entire web browser with it.

> ...because they can treat it like any other desktop application -- with hardware access, and subject to the OS' native task management.

If you need direct hardware access it probably isn't well-suited to being a web app in the first place? Why use web technologies for it then?

> For other apps, Electron allows the world's most popular layout system (HTML+CSS) to be used with one of the world's most popular programming languages. This is a huge boon for re-using knowledge, and perhaps does lead to some amateurish projects. Similar criticisms were leveled towards Visual Basic, where drag-and-drop composing and a good IDE enabled people to quickly crank out a GUI app from an idea.

HTML/CSS can be nice to have in such a situation, although a refusal to learn other GUI frameworks probably makes for a poor (native) developer.

The resource bloat and (usually) extreme disparity with the native user interface rarely makes it worthwhile for me to use an electron app. It feels like forcing a square peg into a round hole because the developer is seemingly unwilling to consider more appropriate technologies outside of their comfort zone. Yes, there are well-made electron apps (like VS Code mentioned in the article), but I, personally, would hate for it to become the norm.
I've stopped citing Instagram as an example of Django scaling after learning from one of their engineering managers at PyCon 2015 that they're running a heavily modified internal fork of Django 1.5 or 1.6. It sounds like they really have built their own framework (before today's Django + DRF existed).

Maybe this has changed post Facebook acquisition. I know Facebook is mostly on Python 3 and modern stuff now.
I have been wondering...does Slack freeze for like a couple of minutes a couple of days a day for someone else?

I am on win10, on pretty hefty machines. No idea if it's because Electron or something else, but it's really annoying. I could not find any trace of issues in the event viewer etc.
A startup is a toss up. The key to financial independence is lowering your living expenses.

Read http://www.mrmoneymustache.com/2012/01/13/the-shockingly-sim... to see why, then start at http://www.mrmoneymustache.com/2013/02/22/getting-rich-from-...

For a programmer-oriented guide that talks a little about financial independence (and eventually a book with much more info): https://codewithoutrules.com/saneworkweek/
If you already don't trust Reddit, then there's nothing lost by this event.
I'd be interested to hear from anyone who has experience with both .net and Swift communities about the differences and similarities in how the projects are run.
Not the OP, but AirBnB has been turning into Uber lately with the way they are strongly lobbying (and filing lawsuits) against consumer/resident protection laws. It's the type of behavior that's guaranteed to erode the public's goodwill.
While I agree with you that the old League launcher was just trash, I am mildly impressed how long it has lasted and worked for Riot. As much fun as it is to make fun of Riot's spaghetti code, they did a decent job with the Air Client, far more than I would have expected before I knew it was Air.
The OP states:

"Smartcards and HSMs are essentially two “brands” for the same thing: a chip which guards access to the data stored within it, and will only allow that data to be accessed in certain ways or under certain conditions. HSMs are the “enterprise” label for such devices, whereas smartcards are essentially the same thing, only cheaper."

Yubikey(mentioned in the title) is a TOTP card that works with the HSM on the far end though. They serve different purposes. You load the tokens into the HSM device.

They aren't the same thing. What am I missing?
Can you please provide some links?
You would mine maybe 1 penny per day. Not worth the click.
Frankly, no, it's not a codeword for unpaid overtime, it means "you will likely just make everyone depressed with your attitude."

You don't need to be passionate about insurance, but you need to be able to show some enthusiasm about building software for insurance, which likely has a lot of exciting challenges (in addition to 90% boring work, as does almost any job). You don't need to be passionate about web agencies, but you need to at least understand what's cool about working at an agency (in addition to what's not). Finance is "boring" to you? There are tons of interesting tech challenges in finance. If you describe every job as boring then the problem might be you.

Nobody is going to hire you just because you can code if you have a negative attitude about what everyone there spends their days doing. Why would they?
Essays like these, along with Thanksgiving conversations with older extended family, are what really make me question the wisdom of eternal life. What if all the people stuck in the past like this were with us forever?
> Yes you are free to starve if you choose so and keeping everyone fed is not the prerogative of a small business.

"Keeping everyone fed" is an... interesting transmutation of the point you're responding to, which is more or less about whether businesses have any ethical obligations towards whatever employees they have (not "everyone") regardless of what market conditions will bear, and certainly stops well short of the idea that small businesses must generally solve hunger.

If the job market is poor enough for a given employee that they don't have any other prospects, should that give an employer license to demand more of their time at the same pay rate? Or perhaps any smaller pay rate? Demand they do things which are health hazards? Coerce into doing illegal things? Demand sexual favors?

> Either way my experience with crappy jobs suggest that it's hard to work more hours because of overtime pay rules. You have to simply work two jobs, which is what many people at places like McDonalds do to make ends meet.

I don't think labor operations of a McDonald's have much to do with overtime, since the situation you're describing generally means the workers in question have trouble getting to full time. But yes, it probably does have something to do with employers trying to avoid bearing the cost of full-time employees, along with trying to optimize labor supply to indicated demand by buying smaller slices of worker time and pushing the cost of coordinating that worker's time on to the worker.

> All of these rules have unintended side effects.

Sure, and debating which ones are worthwhile and effective which ones aren't is great. As it turns out, not having many of these rules also has unintended side effects, which we've had a chance to see in action in the past.
They have access to the public key, not the private key. If you're sufficiently paranoid you could imagine someone acquiring gtihub.com and waiting for `git origin add` typos (let's hope you're also paranoid enough to not ignore new/unknown server keys being added to your known_hosts file).
> On the other hand, this is the kind of paradigm shift that was implemented by operating systems ~20 years ago

What? No. Every OS out there allows the loading of user (administrator) supplied code to increase it's functionality.

In other words, every OS out there allows extensions that touch their internal APIs (or a very permissive subset of them in the case of Windows, that is known by how restrictive this is).
I'd start with the news networks that broadcast Trump 24/7 for a year
> Having worked with Qt I never wanna do that again.

I've had to work on PyQt5 at work, and was pleasantly surprised out how easy it was to hack up a full app.
> On the other hand, this is the kind of paradigm shift that was implemented by operating systems ~20 years ago

No. Kernel modules can be installed at runtime. The user just has to grant the application the necessary privileges.

This means OS developers do not try to attempt to "strike a balance" between power and safety. They allow both, the unsafe stuff merely requires a fairly simple opt-in.

This is the whole crux of the issue. I do not mind security measures, as long as there is a bypass. Mozilla has taken the - in my opinion extremist - position that even bypasses cannot be allowed because they know what's best for users.

> I haven't checked, but I seem to remember that you can provide a platform-specific binary as part of an add-on, spawn it from WebExtensions and then communicate with it through the native bridge.

I am not aware of any such feature. This used to be true for bootstrapped extensions, but not for webextensions.

> I haven't checked myself, but I believe that this mechanism has been published, as an extension called "the WebExtension Extension" or something like that.

yes, only works on dev edition though.
Oh, I'm sorry I misunderstood you.
Awesome mate! Unfortunately, I wouldn't be much good for your available roles, but great to see another successful local company going strong. All the best with going forward.
> For the love of God, learn something else. Learn how to use GTK or Qt. Maybe Xwt is more up your alley. How about GNOME’s Vala thing? Learn another programming language. Learn Python or C/C++ or C#.

All of this takes time. If you want to launch an app on multiple platforms, Electron is a very time efficient way to do this. Obviously native apps for every platform would be ideal but not everyone has the resources for that.

> Let me be clear about this: JavaScript sucks. It’s not the worst, but it’s also not by any means good. ES6 is a really great step forward and I’m thrilled about how much easier it’s going to be to write JavaScript, but it’s still JavaScript underneath the syntactic sugar.

Use something like Typescript or Flow then. The above is like saying C++ sucks because assembly is a bad language to code in.
I really don't want APIs to freely access the filesystem, other processes etc in my browser. And my applications to work offline.

I haven't seen many examples of people using Electron to make applications that really should be web apps instead, but more for packaging web apps with native enhancements. Often I'd prefer a "proper" native app, pushing even more features in the browser IHMO is not the answer.
A soft, wearable microfluidic device for the colorimetric sensing of sweat
Odd question perhaps, but what would happen if you were hacked and that collection was stolen? Would it be considered distribution of CP? Would the legal ramifications for your organization be different from any other kind of data breach?
Ask HN: How do you inculcate a sense of responsibility/ownership in developers?
I have historically been fortunate to work alongside some amazing developers who share the same passion, sense of ownership and the same sense of responsibility towards a task as I do.

Lately though, some new senior developers who have joined our team seem least bothered about deadlines, financial risk or reputation risk which results in projects being delayed. There seems to be zero sense of ownership as the team leads like me are usually held responsible for any such delays.

How does one work alongside such people who do not share the same passion as yourself? Any practical advice?

Things I have already tried:
1. Make them aware about how time-critical a particular project is and how much financial damage it will call if delayed
2. Make them aware that if we complete on time, the amount of revenue will be tremendous which can be translated to a good raise during appraisals
3. Make them aware that successful completion raises profile within peers which leads to better collaboration in the future
One Day Programmers Will Destroy This World
What? The alt right us built os racism, misogyny, and white nationalism. This isn't some sweeping generalization like "all Trump voters are Nazis" or something like that, the alt right is built on fascist, neo-nazi ideals.
At GitLab we also think it is a great feature to bring formally into the software development workflow https://gitlab.com/gitlab-org/gitlab-ee/issues/896
I have a lot of faith in multi-model datastores but I'm a little worried about the Jepsen test post below. Is that true?
An observation on the right is that any organization that is not explicitly right wing will over time drift into being left wing. I think it's correct.
Cool. When a coal fired power plant moves in next door, you might think twice.
I'd say you're the one who has a lack of content problem.

Just the raw text of the article is over 10kb.

The pictures (logo, header, images, graphs in the articles) are easily 0.1 to 1 MB for every article.

The specific article I checked has 2 animated gifs which are MB each. That's why the 5 MB. I sure don't want to pay $50 because of a picture.
No, I did not. Mind explaining?
> What if there was a centralized way of accessing HTML + CSS + JS applications

There is. The major OSs provide APIs to access the platform browser. The downside is you need a platform specific shim to set this up using native code. So, developers need to step outside of their JS worldview for a few days to avoid that 200mb app size penalty.

If you are building a platform agnostic app then I understand the value of Electron to avoid that work across each platform. But, it seems several of those Electron apps aren't even platform agnostic, so why not build the platform specific shim and be a better citizen on my hardware.

edit: I'm daft
Very nice work!
Added OT tag, I was not comparing webextensions, pointing out, this is still an unsolved problem.