HN user

ricardolopes

198 karma

http://ricardolopes.net

Posts14
Comments68
View on HN

I use OMZ because it lets me rely on popular defaults instead of bike shedding and rolling my own. Its main advantage is convention over configuration. For instance, I just have to learn the git plugin aliases once, and then I can use them anywhere with OMZ + git plugin. Is there any lighter alternative that is compatible with OMZ plugins?

The problem I have with coding on Termux is that it's not a full Linux environment, and a lot of tools will fail to compile because there's some dependency that doesn't exist. That includes, for instance, database adaptors for nodejs, which compromises web app development.

Do you use any workaround for that huge limitation? Or just SSH into a proper Linux box?

This could be debatable if browsers had any UI at all to display XML. It's incomprehensible that if you open the open web solution for subscribing to web content (RSS) you're greeted with a wall of unformatted text. Right now, XSLT is the poor fix to that browser's basic inability.

My experience with a Pixel 6:

+ Doesn't have the same compatibility issues Termux has, so I can install things like bun.js and npm packages with native bindings (e.g. database connectors)

- Can't edit text selection, which makes it difficult to copy text

- Can't paste text

- Frequently restarts and loses all progress while switching apps

I can't say much about the battery because I just haven't used it enough to tell the difference. Honestly, with all these major flaws, I usually end up just using Termux.

I hope they fix these glaring flaws soon, IMO they're a lot more urgent to get devs to actually use this than GUI support.

Nitpick: also, a more distinctive name would be nice. Right now, it's basically impossible to search for solutions to Android Terminal issues

Do you believe the amount of time developers have spent building hello worlds is a waste because those are useless applications?

Should go without saying, but the interesting thing about this thread is not that you can now play a flawed text version of an old game. It's that this example toy use case manages to explore the new capabilities and limitations of this new promising tool. This improves our understanding of this technology, and helps us make better use of it in the future, for more productive and innovative applications that we may not be able to predict yet at this point.

TypeScript Magic 3 years ago

Relying on hacks for production code is usually a red flag/code smell that indicates there was probably a better alternative. `string & {}` definitely feels like one of those hacks.

As an alternative, wouldn't it be better to map the list of supported values in a structure like an enum?

Example:

```

enum HelloWorldValue {

  Hello: 'hello',

  World: 'world'
}

const value = HelloWorldValue.Hello

```

And now you can call that enum when declaring a variable value and get its contents in autocomplete. As a nice bonus, because these are references and not strings, you can ask your IDE for all places instantiating those values, which can be a life saver.

I like to focus on the main business element. If it's a SaaS for sharing videos with comments, for instance, I'd take a longer look at the video and comment models, their relations, and the call chain from API endpoint to model.

Another strategy I like is picking parts of the codebase and trying to refactor them. You don't even need to commit anything if you're not supposed to go around changing things: just by spending some time moving things around, seeing what breaks and so on will give you a better understanding of the code and what it does.

I remember reading this book in my teenage years and being moved by its story. I still think about it, and it's one I'd definitely recommend.

I wonder how it got to the top of hn all of a sudden though.

That's not how coinbase operates. You have a "Buy <Coin>" button, and you expect to get that coin without fail, every time. If a new token launches, you should be able to buy it without waiting for users to deposit and sell. Maybe you're confusing with coinbase pro, which uses the more traditional order book model, or with other exchanges?

I don't want DuckDuckGo to filter/sensor based on "politics of the day". I don't mind them tagging results.

Agreed on both. Maybe it should have been done sooner, to avoid looking reactionary. Though I understand why today that propaganda may be considered worse than in the past.

Sure, but there is clearly a difference here.

There's a difference, but not significant IMO. Just like misleading results should generally be penalised, to help people get to the information they requested.

I honestly fail to understand how downranking state-run propaganda that promotes a dictatorship's lies is considered to be a bad thing in a service that is all about providing useful information.

This isn't about silencing a political view, cancelling an unpopular opinion, or whatever. It's defending against a deliberate attack from an oppressive regime. Search engines already have to do a lot of tweaking, for instance to defend against SEO spammers. I don't know how can this be controversial.

Anyway, answering your question, I use and like Ecosia. I've heard good things from Brave Search, but haven't tested it yet.

As someone said in another reply, setting these team expectations is important so that the developer won't assume the reviewer will do the heavy testing, and the reviewer assumes the developer must have done it, leading to preventable production outages.

The developer can definitely do work like providing samples of generated SQL, UI screenshots and so on. Again, knowing who will do that deep due diligence is more important than the actual decision.

This should be something agreed within a team, so that review standards are consistent across team members.

In my previous team, the reviewer was the main responsible for the code they were approving. They were expected to test locally and should actively hunt for potential issues, such as checking in the logs that the ORM was building correct SQL.

In my current team, the developer is the main responsible for the code they're pushing, and is expected to do all the tests needed. Reviews are more about ensuring code standards, finding possible oversights, requirements mismatches, and so on.

No one strategy is right or wrong, as long as expectations are set and everyone knows their responsibilities and expectations.

This is it. If you let the machines do their thing unsupervised, you're creating an optimisation game someone is going to win.

I honestly believe the only way for a search engine to be as valuable as Google was years ago is to let human knowledge drive more decisions. Maybe closer in spirit to what a web app store would look like, or closer to the categorisation Yahoo did. Not to browse by category (though even that would be refreshing at this point), but to better select the most relevant search sources.

Its competitors DNAnexus and Seven Bridges seem to be US based, or at least report having offices there. But Lifebit is recruiting internationally, and even has a US office now too, so AFAIK it should also be a valid option for US folks.

My son (now 4yo) was diagnosed with two rare diseases, due to a mutation in a collagen production gene, and at first it wasn't clear if he was ever going to walk at all. His life will always be severely impacted.

I feel your pain about wanting more R&D around treatments and potential cures but finding almost nothing because it wouldn't be commercially viable.

My main strategy was trying to contribute with what I know best: software development. The company I joined (lifebit.ai) is building tooling to reduce medical/pharma R&D costs, in an effort to make it economically viable to research diseases that weren't viable before. This is a mission I can get behind and that feels like the best use of my time.

I hope you get to find the best way to have the biggest impact. Good luck!

Been thinking about this for a while.

If worker pay isn't keeping up but company profits and equity are, this means that people are overvaluing being a worker and undervaluing being an owner, compared to market equilibrium.

Why would that be? Risk aversion? With the latest advances in global connectivity, online business infrastructure, ubiquitous technology and so on, I'd expect risk to be as low as it ever was.

Something else? What am I missing?

ETH2 was years in the making, with multiple delays and not fully migrated yet precisely because of how unsafe standard PoS is. Vitalik and co spent years researching the best mitigations.

Right now, it seems to be one of the best protected PoS chains. It's still fairly new, with novel mitigations, so it still doesn't stand the test of time against all possible attack vectors.

In that sense, it still can't be considered as secure as a PoW chain with high hashrate, which is protected by thermodynamics (you can't produce more hashes than the physical energy you have access to allows).

Maybe I didn't word it right, but I wasn't calling bitcoin's method reliant on centralised authorities, just asking if there were more methods out there that weren't as well.

Bitcoin is an open source permissionless protocol, so you have multiple clients to chose from, each with their own list of bootstrapping nodes, many open source where you can submit a PR to add your node too. You can even build your own client and point to whatever you want. You can also just ignore them and just point directly to nodes in a list from a public forum, a private chat, whatever.

Also, you're not just connected to those bootstrapping nodes: you use them to find the rest of the peers in the network.

Changing consensus rules requires coordinating a fork. This requires coordinating developers, miners and node operators. That may fly in pseudo decentralised chains where the community accepts whatever the leader says so, and even so, at high risk. In bitcoin, for instance, where there is no leader, this would never be a viable scenario.

Soft forks don't force you to download and run new clients just to be able to use the network, which is an important difference. You can use your existing client, you just don't have the new features and don't run validations on them.

The greatest risk on soft forks is that chain split you mention. That's why any reasonable soft fork deployment requires a long time window with a large majority of hashrate signaling support (like 95%).

The block 200 will be adding validation to the previous blocks, and will be validated by the future ones. Without other types of checks, nothing stops you from rewriting the previous 199 blocks and using block 200 to validate them.

This is not FUD, it's the most obvious PoS flaw, called long range attack, and the reason PoS chains often need more checks to be more trustworthy (e.g. keeping hardcoded checkpoints, choosing the first received block as valid, introducing penalties and so on).

The Bitcoin Core client includes a hardcoded list of DNS servers that point to thousands of nodes. These lists get updated frequently by different people. Other clients may use other lists. What is the threat model you're suggesting here, exactly? Do you know any other way to bootstrap a peer to peer network without centralised authorities?

All network participants are forced to verify the full chain from genesis. Some might be OK with validating block header signatures only, and not the full transaction set. It's a tradeoff.

You don't need to use those public key servers if you somehow distrust the CA certificates in your OS. Feel free to contact the repository maintainers or whatever else floats your boat.

Anyway, bitcoin is an open source protocol, not a particular client implementation. If you distrust everything and everyone, no one can stop you from building your own client that works with the rest of the network.

That is money taken from custodials (i.e. the bitcoin wasn't actually yours) or through force from captured individuals. No part of that was taken by calling the bitcoin CEO to require editing the balances on the blockchain.

The original argument was that with traditional finance, banks could edit your balance when needed. That can't be done with bitcoin: the protocol won't accept transactions that aren't signed with the owner's private key.

The best metaphor is perhaps digital cash. No government can edit the cash in your wallet out of there, but as the owner, you can definitely lose it by force or stupidity.

Being lawless is a feature, not a bug. This is why, despite the many apparent flaws, bitcoin usage just keeps on growing with people living under authoritarian regimes, for instance. The money is yours and no government can confiscate it.