Hacker Newsnew | past | comments | ask | show | jobs | submit | more BiteCode_dev's commentslogin

And if ChargeBee bans you, you are still dead because that's a single point of failure. No, you should have several payment processors, and rotate them regularly to check they work.


Besides being a single point of failure, we tried to switch to ChargeBee and found them to be pretty lacking (to put it mildly). The platform looks nice and has lots of options, but under the hood things seem pretty fragile. Horrible docs, random 500 errors that weren't showing on the status page (and support ignored until more customers reported it), our Stripe gateway disconnected and the system still appeared to be working (partly, partly failing) with no alerts, plus lots of other odd behaviour. To be fair, all of this was on the test system, but we didn't feel confident to go live so we put the migration on hold. YMMV of course.


Fwiw, I’m just using them as an example. There are likely plenty of other options.


Under ChargeBee's terms, they must provide you with your data for up to 120 days following any termination. So there's that at least.

> 7.2.3. Data Export Following termination or expiration of a Subscription, We will retain that Account’s Service Data for one hundred twenty (120) days from such date of termination or expiration (“Data Retention Period”).

I mean, ideally we need an open source PCI compliant equivalent of ChargeBee so that you can 100% own your customers payment information.

That's the way this problem really gets solved, but the security surface for that open source project is going to be a challenge.


SLAs only entitle you to a refund, not compensation for lost income. If you’re not making at least four times as much off a service as you pay for it, you really need to think about why you use that service.

Power can go out. Promises from the power company don’t fix that. Only backup power does.


Point here was that you’d hypothetically be able to get all of your data to setup an alternative if you had to, rather than just being shut down and waiting for them to fix it.


Once you trust your vendors absolutely, your company becomes their company, because they can do whatever they want with it.

What always confuses me about this is that it seems like many owners trust their vendors over their own employees and I don't even know where to start unpacking that sentence.


The problem with that idea is that PCI compliance doesn't just include the software you're running, but the infrastructure you run it on, various elements of organisational security and, of course, certification costs.


It's been a while since I dealt with this side of ecommerce - how can you have several payment processors, and rotate them, without having to handle card data yourself? (Most folks aren't really equipped to do that.)


You use several API, attach one provider per customer to divide the risks. When one provider bails out, you onboard new customers and new payment on the other payment provider.

Then you only loose the recurring payments on the lost provider that are on hold, and you are not dying, so you can resolve that problem using a lawyer.

This is crisis management, not technical perfection that you need for those situations.


    display_cc_form_that_handles_cc_data_so_we_do_not_have_to() {
        which_one = random_number(3)
        switch which_one {
            case 1:
                display_authorizedotnet_form()
                break
            case 2:
                display_stripe_form()
                break
            default:
                display_paypal_form()
        }
    }

Plus the same integration work for each one that you'd have to do anyway (which may be little or none if you're using a platform that integrates all of them via plugins or settings or whatever)

Like maybe don't literally randomize it request-by-request, but that's how you'd be ready to use multiple processors, and you could do something a little more complex to, say, rotate which one you're on every Wednesday, or whatever. Or just have it ready so a one-line code change or config toggle switches which one you're on (that's only worse because if something's not used frequently in prod, there's a good chance it doesn't actually work, even if it once did)


It's been a long time since I've worked in eCommerce but at my last ecom role we used two payment processors and simply stored the card data with both for every customer, and the relevant IDs in the customer record in the database. Whenever anything got charged we'd check which processor we were supposed to use and off we went.

Yes this has an increased cost if your processor charges by number of customers, but I don't think that's particularly common - these two were just revenue + monthly fee.


Great solution, I wouldn't have thought of this. Did you ever get complaints about the charge description looking different month to month, or did both processors pass the same description to the customer's credit card?


I don't remember for sure (this was pushing 10 years ago and early in my career), but I don't recall any complaints of that type.


The problem is with recurring payments. If you used this approach and 1/3 of your customers were initially billed through Stripe, then if Stripe bans you then you can't charge the next month's bill through something else because you don't have the stored data for it, you have to ask them to re-enter data in another processor's system.


Another wrinkle, in practice, is that you can often negotiate significant discounts on fees, based on volume, if you've got enough of it. Yes, including with Stripe and other places that have fairly-transparent public pricing—the big-boys don't pay those rates, they pay lower ones negotiated with a sales rep.

Splitting up your payments reduces your volume with each one, which can mean you're paying higher rates overall. Or, if you go the "keep an unused alternative on standby" route, you'll likely at least have some initial traffic that pays higher public-pricing rates until you can convince them to give you a better rate, and put it in effect.

Still might be worth it as a kind of insurance premium, but it's something to consider.


This isn't "rotating payment providers", though, this is sharding customers across them. Which may be a good idea, insofar as it could reduce your blast radius, but it doesn't allow for portable customers--which seemed to be what the GGP was implying.

'pc86 has an interesting solution in a sibling comment, but I don't think you can do this across the high-touch providers, eg Stripe+Paypal.


That's why you need a self hosted solution.


I assume it has been debated again and again, but since I don't know the answer I'm going to ask:

We often complain people hold cryptocurrencies instead of using them as money. Isn't this change going to make this worse ?


Ethereum isn't supposed to be money (though it can be), it's fuel you use for doing other things. Do people use less oil because it's deflationary and gets consumed when used? No, because it's useful now.

The most likely end game for Ethereum is being a replacement for all backend financial systems. Instead of having to hire teams of people to verify things or integrate various legacy systems together, everyone can build on one neutral platform and pay a little ETH as the fee for using it.


The most likely "end game" is not replacing all backend financial systems.


Banks would never switch to a system that makes all transactions publicly traceable, and they shouldn't.

The industry has investigated blockchains for many years, since distributed consensus for transactions is a problem they actually have. They might run their own private chains. But it won't be ETH.


They never said anything about Banks.

Conceptually, a service provider utilizing Ethereum could create or aggregate on-chain services and package them in a similar format to what a bank is today with very little overhead.


Conceptually, yes. In reality, no major bank would ever do it.


I heard exactly the same said about AWS in 2009, now almost every major bank uses it. Once something is shown to be more efficient those banks are going to have to adopt it or justify their inneficiency to their shareholders.


It is already happening. ANZ, one of Australia’s top 4 banks released a Stablecoin on Ethereum earlier this year.

https://www.afr.com/companies/financial-services/anz-the-fir...


Lots of companies released blockchains and coins. It's called FOMO, or "Metoo-ism". Interpreting this (or IBM's blockchain) as signs of a significant market shift is a triumph of hope over realism.


It won't be public and it won't be distributed - it would quickly revert to some form of centralized piece, hopefully one at each bank, but will probably end up with one huge central point. They will still call it blockchain to attract gen z to work there, but behind the scenes it will work just as badly as the current mess. It's in the bank's/banking industry's blood and regulations to centralize. Whatever gets thrown their way will get locked down and centralized. I can just imagine the huge audit systems that will spring up to audit the blockchain (where ideally you wouldn't need to audit it to begin with, just look at it cause all the same info is in front of all parties, unmodified). Nightmare fuel actually. Better just to start from scratch (new banks, new core banking software, different kinds of audits and regulations).


There is something called zk rollups on Ethereum, and some use zero knowledge to make transactions private.

Like Aztec Protocol, which is used by zk.money.

It’s also the same technology used by Tornado Cash, which was sanctioned recently.


Curious how many banks you've worked for. I've worked for a couple.

And they pride themselves on differentiating themselves in the market by offering specialised products and services.

Not sure why a bank would deliberately want to turn themselves into the equivalent of a reseller.


Do those banks use AWS now? Did they fight it with many justifications of why bare metal is better and cheaper and more efficient before finally realising it's holding them back? Because that's what happened in every company I worked in and that same thing is going to happen to every company working in finance.

In a capitalistic world efficiency comes before pride or your shareholders replace you.


The only problem with this analogy is that “cloud” was able to quickly produce numerous examples of material cost savings. You’re right insomuch as the banks were all over it as soon as the business case was proven. But there’s nothing comparable in the crypto space.

Who is using crypto to deliver mainstream financial products (banking, insurance, credit cards, loans, mortgages) at lower cost?


AWS came out in 2007 and most companies barely started exploring it until at least 5 years later. All of the same arguments I heard about AWS back then I hear about Ethereum right now (it's more expensive, bare metal is more flexible, we have to recode things in the AWS way) but people have selective memories and think things that are obvious now were always obvious.

Most banks in Australia are working on crypto related products, Visa is too. Eventually once a few have a network together, especially internationally, the snowball accelerates because of Metcalfs law and soon it's more costly to not integrate.

The way I think of it is "if we had everything running on crypto rails, would companies want to switch back to what they have now" and the answer is obviously no, so it's just a matter of time until it happens.


It’s really non-obvious to me that there is any advantage of crypto that makes its use inevitable in financial products. Those Australian banks - are they crypto-related products in the sense that they appeal to crypto people (maybe a way to buy or trade crypto?), or are they actually more efficient versions of mainstream products? The idea that banks will inevitably adopt crypto because their crypto-using competitors will be more cost-efficient seems implausible to me. I just don’t see the mechanism for crypto being a cheaper way of doing things.


Wait, so this cryptocurrency was never supposed to be... ...a currency?

In this case, the crypto-not-currency community really needs to work on branding.


The merge won’t affect gas fees, which makes Eth unsuitable for small purchases when the network is busy. Apparently Eth will do other work in future to fix that though.


not just work in the future, work is being done right now! https://www.eip4844.com/


Stablecoins are mostly what people use for payments. ETH is what's staked on the beacon chain.


I never use stable coins for payment, and I don't know anybody who does despite being in crypto since btc was at $8. I do pay stuff in BTc and get paid in BTC once in a while and see people in my bubble do the same. We use stable coins to limit taxe exposure, mainly.

It's true eth has never been a mean of exchange for any of us and more a platform for smart contract (my friends at kryll.io use it for that).


The majority who trade crypto use stablecoins for payment all the time. It's the default on most exchanges, and for a lot of the biggest pairs on DEXs.


You are talking about trading, I am talking about anything but trading.


If you are talking about payments of non-crypto products, I was exploring the hiring for small jobs subs on reddit yesterday and the two main accepted means of payment I saw seemed to be PayPal and stablecoins.


ETH as cryptocurrency mainnet still has the same high gas fee when it was PoW. Some layer 2 solutions will have the utility to use their token as cryptocurrency because low gas fees.


Frenchman here, and have a very close Kevin.

It's true there are stereotyped jokes about Kevins, especially in the IT word.

But it's nowhere near the the scale of what the article or the documentary suggests.

Kevin, working in IT, confirms that he hasn't heard the joke in years, and even in the 90, it was probably once a year. It never affected his life in any way. Honestly being a nerd in the 90' was the hard part.

It reminds me when we had a couple of cars burning in Paris and the US medias reported it as civil war. I had clients calling me, asking if I was OK.

At this stage, I'm assuming anything the medias are reporting is BS until proven otherwise. They destroyed the credibility of their own job.



pypi contains 399 794 python packages.

debian repositories have 23 168 packages, all languages included.

Or are you suggesting each python package author should release one version rpm, one deb, one nix, one msi, etc? And then that the deployment script branches for every single OS isolation isolation there is?


It's just a comic, it doesn't have to be accurate, and I think it delivers the message.

Besides, "you understand how a venv works" is not that simple.

- if you use anaconda, do you use conda env or something else? This will have huge consequences on the availability of packages and modes of failure.

- do you use virtualenv or poetry? In that case, how do you install them? How do you run them? The answer to this will change depending of your OS.

- do you use homebrew or pyenv? Then you env may just break on you one month later, will you be able to fix it?

- do you use venv? In that case do you know about the "py" command ? Do you know about "-m"? Do you know which packages to install on linux so that it's available?

Last week I was playing with a telegram bot with a friend of mind. I asked why he didn't use a venv. He told me he could never remember how it worked.

He has been running very lucrative a django site for 10 years.


Devs are definitely no fungible, the difference in the productivity, team moral and new bug introduced by just changing one person in the team can be huge.

Even simple boilerplate is done differently by people. Some will automate them, some will do them manually forever. Some will naturally organize to discuss how to limit or improve them, some will stay with the status quo ad vitam. Some will document how to do things, provide templates to limit mistakes and mentor new comers. Some will just do their job.

And that's not even touching the fact some are simply bad at what they do.

In all the successful projects I've seen, hiring the right people or replacing the one leaving were critical processes, not just swapping.

This idea you foster is probably half the reason 2/3 of IT projects fail.


Python is still a lot of fun in certain areas:

- machine learning, because AI is fun, and it's very easy to play with it in python. Also because you can easily stitch services together that allow you to make cool apps without having to code the hard part, like creating a discord bot to talk to midjourney.

- anything that will use pydantic and type hints to generate parsing and validation. Fastapi, typer, etc. It's really a blast to just define types, and see your web api take off.

But it is to be expected that when something has reached a critical mass, it becomes banal, and therefore not exciting anymore.

Also, the Python ecosystem and resources have accumulated a lot of legacy stuff, and has been flooded with new comers content, so the noise to signal ratio is not great these days.

I though as a python expert I would be less relevant given the number of new devs entering the market. Boy was I wrong. It just feel like having a cheat code to ask for more money to my clients, by the sheer amount of things I learned because I was there 15 years ago.

The dependency thing is a good example. Dependencies is in actually a better state that it used to be, but because there is so much noise, very few people can enjoy it because they would have to setup python in "the right way" to do so. However, unless one invests a huge amount of time in looking up for this right way, filtering all the noise is going to be impossible. Hence most people have a broken python setup, and when they try to install something, it has a high chance of breaking.

Of course, technical dept, and our inability to pay it back as a community, doesn't help.


What's the cliff notes of the right way / where's the signal in noise?

I don't write Python, but Python is like Java these days, it finds you.


In short, a huge number of packaging problems come not from packaging, but from the way you install, configure and call python. Unfortunatly, everybody and their mother tell you how to do this, and you'll find 1000 articles to get you in trouble, but very few to tell you what you should actually do.

The full story is pretty long and most people don't have the time and resources to learn everything about it.

The easiest way is to follow a receipe for the least pain possible, which includes limiting yourself to a single path for bootstrapping python. Here is the one I currently recommend to my teams at the end of the comment:

https://news.ycombinator.com/item?id=32805483#32807220

It can't solve as much as knowing the whole deal, but it will remove a lot of ways to shoot yourself in the foot, and work around a lot of the legacy issues. And above all, it's easy to keep around and to apply. I noticed that anything more complicated will lead to people, so I removed a lot of things from it years after years (like -m, pipx, etc).

Of course, this will not solve the setup that are already in place, which you will likely have. I can't provide a generic way to solve that, there are too many possibilities.

Hopefully the community will eventually solve most of this by providing better default in the future, but this is an excrutiatingly slow process.


My impression is Python packaging is stuck in a local maximum, and that any attempt to move out of it will be as disruptive as 2->3. Dropping support for conda et al will only split the ecosystem, hasten the rise of Julia, and make Python packaging more acrimonious. I like your simplified approach (and take a similar approach where I can), but much of the value of Python comes from its ability to be inserted without too much fuss (assuming you'd build things from source) into an existing system. I'd suggest while wheels were a good idea at the time, they've become a parallel ecosystem and source of division.


Not at all.

As I said, most packaging problems don't come from packaging itself, but for bootstrapping. Symptoms from a terrible bootstrapping situation creep up and they come out in packaging.

Unfortunaly the solution is of the worst nature possible for a FOSS project, because not technical: it's policital. This is the kryptonite of volunteer efforts.

The community has to get organised around one way to install, configure and run python. But it's really hard to do, and requires to synchronized a lot of different group of people, efforts, and make sure everyone are on the same page.

E.G, of a single point:

To chose which version of python to run, the installer for windows provides the "py" command, anaconda provides the conda prompt, but the windows store provides a suffixed command like most unix do. Most people are not aware of those differences, and when they attempt to follow a tutorial that has been written by somebody knowing only one of those combinations, the person will fail. Either with a "command not found", a broken install, "import error", a "syntax error" or installing things for one version of python and running the other version by mistake.

This will lead the person to believe packaging is broken, while it's not. The way we install and run python is broken.

But how do you solve this problem? By engaging in a long, frustrating and thankless talk with each of the parties involved. There will be debates, people will talk about taste, diversity, backward compatibility and so on. It will be a nightmare.

The alternative would be for the core devs to come up with a single recommended setup for all plateforms, with a unified configuration, and promote that massively. This will cause another huge political problem: you now have 10000 of tutorials that are referencing one of the old ways, and you will spend the next 20 years explaining to people any previous configuration are not supported. There will be a lot of complains from devs, and pressures from companies.

Either way, you end up with a load of work, and unhappy people, which nobody wants to sign for. It would be better on the long run, but nobody wants to sacrifice themself to be hated in the end.

And that's just one single point.

You still have to solve homebrew troubles, linux distro splitting python and limiting versions, bootstrapping tooling outside of venv, solving the uncanny valley of venv, and so on.

Note that we haven't even touched packaging yet.


> A recent example is WakaTime, who replaced Celery with a custom-built queue. This effort took one week to build and productionise, and consisted of just 1,264 lines of Python.

What a load of BS. Wakatime doesn't even have tests, has been used by one person and has no error handler. It's 1k lines because it's alpha sotfware.

Celery is not the most fun to play with, but it's not big for nothing. It supports many routers AND result stores, and you can mix an match. It has several policies regarding errors, has a beat daemon, provide an API for monitoring and managing (see: https://flower.readthedocs.io/en/latest/ for UI), etc.

Also, you can use celery in a very bare bone setup using only the FS for routing and storage: https://www.distributedpython.com/2018/07/03/simple-celery-s...

I understand you may want to avoid celery. I had bad experiences with it myself. Most projects can get away with rq, or even just multiprocessing.Pool.

> Before embarking on the mission of creating a new task queue do survey the existing options, but make sure not to underestimate the hidden costs of using one, or the benefits that may come with writing one from scratch.

Writting your own task queue is like creating your own csv parser. It seems like a very simple task that is barely a for loop with a split. And then you start hitting edge cases after edge cases.

Basically you are coding an asynchronous, fault tolerant process manager including task serialization, communication protocol, priority queuing and lifecycle.

That's not something you usually want to do. The cost of using one is unlikely higher that the cost of creating, maintaining and documenting one. Just go with a simple existing task queue if you need something simple. Pypi is full of those.


The task queue we built at Thread wasn’t much bigger, actually supported multiple queue backends, had tests, and has run millions of jobs a day for a decade. The team knows it very well, and it takes a few days a year to maintain, improve, and iterate to fit with new infrastructure.


The dirty secret about Python packaging problems is that a lot of them... are not relatated to packaging.

Python has first and foremost a big __bootstrapping__ problem, and the consequences of that are often seen when you try to install or use dependancies. So people conclude that packaging sucks.

Now don't get me wrong, packaging have some problems, but compared to most languages out there, it's actually pretty good.

But people cannot enjoy that, because they would have to install, setup and run python in a perfect sequence.

So what's wrong with Python bootstrapping, and why does it affect packages?

Well, as it is often the case in FOSS, it stems from too much diversity. Diversity is tooted as this one great thing, but its benefits also come with a cost.

- there are too many ways to install Python. Official installer, anaconda, Windows Store, pyenv, homebrew, Linux repositories... They all come with different configurations and lead to problems, such as anaconda being incompatible with pip or Linux default setup not providing pip.

- it's very common to have numerous and diverse python installed on your machine. Different versions, different distributions, sometimes embeded Python... Now it's your job to know which Python you start and how. But people have no idea you should use "py -3.10 -m pip --user install black" and not "pip install black" on Windows if you want a clean install at the system level. Yes, this weird command is the only clean way to do it outside of a venv. I'm not making it up.

- the variation between the different ways to run Python and the commands lead to confusion. "python", "python3.10", "py -3.10", "pip", "pip3", "python -m pip", "sudo pip"... There are many wrong ways to do it, and not many good ones, and it all depends of the distribution, the OS, and wether your are in a venv or not.

So how does that affect packaging? Well, people will get a lot of "command not found", and so they will google and paste commands until one works. There is too much to know, and they want a solution, not learning the whole graph of possibilities. Eventually they do something that seems to work, but they probably installed with admin rights, or in anaconda with pip, or in the wrong Python version. On import or on run, something will then break. Maybe now. Or worse, maybe in one month. And they have no way to understand why.

What's the short term solution for you?

- Always use the official installer on Windows and Mac. Don't use anaconda, don't use homebrew, don't use pyenv.

- If you have to use Anaconda (I would advise not to), don't use virtualenv and pip, use their own tool: conda and the anaconda prompt. You will be limited in packages, but it will work. Don't mix conda and pip.

- On Linux, you will have to figure out what magic packages you need to install to get a full Python setup, because linux distributions authors don't provide a full Python by default. It's different for each distribution and Python version sometimes. It must include pip, venv, setuptools, tkinter, ssl and headers. Good luck.

- Don't use Python outside of a virtualenv. Ever. I know how to do that correctly. You probably don't. So don't. Always create a venv for each project you work on, and activate it before doing anything. From there, you can use pip and Python in peace. E.G: Don't install black or jupyter outside of a venv. You want to use poetry? Don't let it create your venv. Create one, activate it, then install poetry with pip, the use poetry from there. I'm not kidding.

- On Windows, the command is "py -3.10 -m venv name_of_your_venv" to create it, with "-3.10" to be replaced with the version of Python you want. On Mac and Linux, the command is "python3.10 -m venv name_of_your_venv". Yes. Not a joke.

- To activate it, on Windows it will be name_of_your_venv\Scripts\activate", on Mac and Linux, "source name_of_your_venv/bin/activate.sh".

Any variation on this (including using -m or pipx, which I used to recommend but don't anymore) assumes you know what you are doing.

What's the long term solution?

I give some hints here:

https://twitter.com/bitecode_dev/status/1567790837848743937

And meanwhile, take the official survey on packaging, this will help pin things down for the team:

https://www.surveymonkey.co.uk/r/M5XKQCT


Definitely conda is more problem and less solution.


So... zombie cells cause by pollution?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: