Hacker News new | past | comments | ask | show | jobs | submit | herge's comments login

I hit annoyances when using sqlite when dealing with some corner-cases. I wanted to implement a lock and share some small amount of data (who did what when) between two different linux users on the same machine.

I figured "sqlite is better than fopen, let's use that!", but between directory permissions, all the WAL files, probably the sqlite3 python lib and Diskcache (https://pypi.org/project/diskcache/) not helping things, it was a real pain, where regularly under different race conditions, we would get permission denied errors. I managed to paper it over with retries on each side, but I still wonder if there was a missing option or setting I should have used.


> I managed to paper it over with retries on each side

You'll hit that elsewhere as well. “Papering over with retries” is standard MS advice for Azure SQL and a number of other services: https://learn.microsoft.com/en-us/azure/architecture/best-pr...


I feel you! I had an ASP.NET Core Web API using a SQLite file for data storage. It was working exceptionally fine in development. When we released it, as soon as more than 10 users were throwing request upon it, it got so deadly slow. Obviously caching and some tweaking helped a lot. But it was far from easy to find, understand and test (!) all required options and optimizations.

Other than that I still love SQLite.


Was WAL enabled?


If I remember correctly, we set journaling to OFF, as it was a read-only database.


> company luxury cars for the executives, a company home that they let the CEO live in, and executive compensation

All those should be taxed like the equivalent of income for those executives, which is a higher rate than the corporate tax rate. If these benefits in kind are not taxed as income, then it is fraud.


Does anyone know of a good KeepassX client on iOS?


KeePassium for the client on iOS and iCloud to sync the database between laptop and iPhone works pretty well


Another vote for Keepasium. There is a paid upgrade but if you have only one db file I don’t think it’s limited in any way.


Also interested. My current solution is to open the master file on my laptop, then slowly type the password from my laptop screen to my iOS device.

I think if you use a MacBook you can use a "universal clipboard" of some kind [1] but I use a linux thinkpad.

[1]: https://support.apple.com/en-us/HT209460


Apple has keychain linked to an icloud account but it's subpar of a password manager at best. Most mac people who I know that are techy just use lastpass.


I use Strongbox[1] to pullmy keyfile from dropbox. (not affiliated)

[1]: https://apps.apple.com/us/app/strongbox-keepass-pwsafe/id897...


This was the rabbit hole that got me off ios.

Apple only cares about your security if you're gonna continue being a paying customer.


i use kypass – not fancy, but supports touch id and serves me well. one-time payment of 7$. https://apps.apple.com/us/app/kypass-keepass-in-sync/id12587...


If you don't want to pay a ton of money, I use KeePass Touch.


Strongbox, or Keepassium


Because it is unconstitutional for the federal government to but into commercial law that is not under it's purview?


Provinces aren’t states. The powers of the Canadian provincial governments are delegated to them from the Canadian federal government, not the other way around. Canada does not have a constitution that constrains federal power, since it was not formed by the uniting of states wary of federal power, but rather the uniting of colonies which all considered themselves to be under the aegis of a single sovereignty (Britain).

Fun fact: rather than each province having a plain-old governor, Canada (as any Commonwealth country) has one Governor General for the whole country; and then each province has a Lieutenant Governor, also appointed by the Queen, to serve under the Governor General.


This is not trure.

Provincial powers are not delegated by the federal government. The canadian constitution lists certain powers the provinces have and certain powers the federal gov has, with basically anything unmentioned being federal. The federal government doesnt just decide willy nilly what is being delegated to the provinces.

The lieutenant governor doesnt serve under the governor general-they just have different spheres of influence . In provincial matters the lieutenant-governor represents the queen, not the governor general.


> The canadian constitution lists certain powers the provinces have and certain powers the federal gov has, with basically anything unmentioned being federal.

That's interesting. It's pretty much the opposite according to the US Constitution, which delegates certain specific powers to the feds, anything else is (supposedly) up to the states. In practice, though, that's been ignored quite a bit in the last century.


I think the joke is, that canada wanted strong federal government and weak provinces and ended up with the opposite. USA wanted strong states and weak fed, but ended up with opposite.*

*IANA political scientist, i dont know how true this actually is.


This was discussed by my political science prof when I took such a course, so I am willing to vouch for you on this. :-)


> The powers of the Canadian provincial governments are delegated to them from the Canadian federal government, not the other way around.

The provincial and federal governments are all sovereign, mutually bound under a single constitution. They both derive their powers in parallel from the Constitution Act.

> since it was not formed by the uniting of states wary of federal power, but rather the uniting of colonies which all considered themselves to be under the aegis of a single sovereignty (Britain).

Quebec certainly did not consider themselves under the aegis of British sovereignty. Much of confederation was effectively about assuaging the concerns of Quebeckers losing their religious, linguistic and cultural identity in an increasingly majority-English country.

In some ways, the provinces have more powers than US states. For example, provinces do have a right of secession. If the majority of Quebeckers do vote to leave at some point, the federal government has no legal power to stop them. Though Quebec can't secede unilaterally, either. Both parties would be constitutionally-bound to negotiate a mutually acceptable path to independence.


This is false. Lieutenant Governors are appointed by the Prime Minister of Canada, but are beholden to neither the federal government nor the Governor General. Lt Governors simply perform the same role at the provincial level that the Governor General performs at the federal level: 99% of the time just a ceremonial rubber stamp of signing a bill into law.

Canadian provinces are spelled out specifically in the Canadian constitution; they are not creatures of the federal government (unlike municipalities, which do exist at the whims of provincial governments, which is a big problem IMHO, but I digress.)

The only paternalistic powers that the feds hold over the provinces are Disallowance and Reservation. Neither of those powers have been used in decades. Despite the failure of constitutional amendments that, if passed, would have explicitly removed those powers from the constitution, their disuse has raised questions as to whether they are effectively defunct by convention. I suspect that any attempt by the feds to disallow or reserve a provincial law would make its way to the Supreme Court of Canada to answer that question.

Furthermore, any attempt to use those powers on a provincial government, especially so in the case of either the governments of Québec or Alberta, would result in a serious crisis of national unity.


Provinces aren't states, but, for example, I live in a distinct nation to you (I assume, if you are under the "aegis of Britain" ;)

There is no written constitution, but there are specific acts, charters and traditions that form constitutional law, and define the clear divisions of responsibility between the provincial and federal government. That includes my government's right to set laws about signage of commercial establishments, specific consumer rights I get, and also the commercial law around the sale of both alcohol and cannabis.


This is canada we are talking about not britian or anywhere else. There is a written constitution (there are also unwritten parts of the constitution but that is beside the point). The written constitution lays out the powers of different levels of government.

https://www.canada.ca/en/intergovernmental-affairs/services/...

Inparticular to quote the gov of canada website:

>"For example, the federal Trade and Commerce power (s. 91(2)) has been interpreted to mean that Parliament can regulate trade generally in Canada, as well as the flow of trade across provincial or international borders, but cannot regulate the operation of particular industries, businesses or professions within provinces. The provincial power over Property and civil rights (s. 92(13)) gives provinces the authority to regulate trade and commerce within their respective territory."


> I assume, if you are under the "aegis of Britain" ;)

Not me, but certainly the provincial legislative assemblies of 1867 :)

> there are specific acts, charters and traditions that form constitutional law, and define the clear divisions of responsibility between the provincial and federal government

The difference is that these powers are a delegation of federal power to the provinces, rather than reservation of state power away from a federation.

The relationship between the federal and provincial governments in Canada is a lot like the relationship between the Queen and the parliament in Britain: in practice, right now, the Queen is powerless; but technically, the parliament's power derives from the Queen, and there's nothing legally stopping a monarch from revoking that delegation of power. In the current cultural climate, that'd be unthinkable; but all it would take is "mere" sectarian shift to allow for it.


No, that's not correct. Provincial and federal power are both derived equally and in parallel from the Crown. One is not subordinate to the other.


> the uniting of colonies which all considered themselves to be under the aegis of a single sovereignty (Britain).

Mostly they were united under a common desire for welfare transfer payments. Except Ontario, which pays for that, eh.


Yes, and slowly upgrade from bcrypt(sha1(password)) to just bcrypt(password) as uses reenter their password. Do the same when you finally upgrade from bcrypt to whatever is next. No harm in specifying the encryption 'state' in your database for each user.


And if you really spend a lot of time in a python debugger, pudb (https://pypi.org/project/pudb/) is a lot of fun. It includes a full curses debugger, it saves breakpoints between runs, can run any interpreter (ipython, bpython, ...) you want, etc.

And since it's console only, you can even run it remotely without too much hassle.


One complaint about buildbot is that if you get too creative, your buildmaster.cfg gets very hard to maintain, but if you stay very diligent, just having python (and being able to print or log whatevery is happening) makes debugging and having complex setups be very easy.

Also, if you ever need to schedule jobs/tasks (not just ci builds) across multiple machines, buildbot is great because all you need is a master, and slave python processes which just need a network connection to the master.


Maybe the spry takeaway is that you should write tests for things you want to make sure they will not break.

Your UI being off by a pixel won't break your application, so if a test hangs on that, then it is not a good test.

However, your business logic, or network protocol routine, those should not break even if you heavily refactor or add new features (especially business logic where a broken behaviour might seem correct), so those need to be heavily tested.

If it is hard to test the juicy parts like business logic without also dragging in the UI, different OS/platform/db parts, etc, then you should look at how your application is structured and if it is really optimized for writing good tests.


> you should write tests for things you want to make sure they will not break

You should also write tests for things that are already broken before you work on the fix so that you can be sure it's actually fixed. Basically the red/green/refactor cycle[1] from TDD.

[1] http://www.brendanconnolly.net/test-driven-testing-red-green...


>Your UI being off by a pixel won't break your application, so if a test hangs on that, then it is not a good test.

For brevity in the previous comment, I didn't fully flesh out the background on why fragile UI tests get created. It happens accidentally.

What sometimes happens is the the UI tester uses a "macro recorder" to record mouse movements and clicks. But then, a programmer shifts the position of a zipcode field by one pixel which throws the script off because it expected UI elements in a different spot. Fixing the broken UI tests is time consuming and can leave a bad impression that tests create a lot of effort for very little payback.

The return-on-investment of UI tests depends on the business circumstances. I'm guessing Boeing and Airbus have automated UI tests that sometimes break when programmers change things which causes rework. However, the pain of fixing the UI tests and keeping it sync'd with the UI code is worth it for avionics software.


Visual diffing in UI tests is something that actually can be solved with more code, see https://github.com/americanexpress/jest-image-snapshot, https://github.com/gemini-testing/gemini, or https://github.com/BBC-News/wraith.


> Audit FOSS and sell your audit guarantees in a contract

Pay Redhat enough and they will do that. Although you will be limited in what you can use.


Don't know why you're being downvoted, because Red Hat does indeed audit all of the code we ship in RHEL (and believe me it's pretty tedious). We don't ship much in the way of Javascript libs though.


Really? There are no suburbs in Canada? There were sure a lot of poor neighborhoods in Montréal near the downtown core in the 60's and a lot of residential development on the South Shore and the West Island.


There absolutely are suburbs. But relative to the US, Canada’s major cities have maintained bigger inner-urban middle classes.


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

Search: