News for hackers. Stuff that matters.

herge

Re:Quirks, Caveats, and Gotchas in SQLite on Thursday October 20, 2022 @09:49AM (#33274666)
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.

Re:Games people play with cash flow on Wednesday December 09, 2020 @11:36AM (#25360454)
> 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.

Re:KeePassXC 2.6.2 Released on Thursday October 22, 2020 @04:48PM (#24863138)
Does anyone know of a good KeepassX client on iOS?
Re:Why Canada's cannabis bubble burst on Sunday December 29, 2019 @02:30PM (#21907896)
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.

Re:Why Canada's cannabis bubble burst on Sunday December 29, 2019 @11:01AM (#21906529)
Because it is unconstitutional for the federal government to but into commercial law that is not under it's purview?
Re:Notice of Security Incident on Wednesday June 05, 2019 @05:30PM (#20109376)
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.
Re:Icecream – A little debugging library on Friday May 10, 2019 @11:11AM (#19878503)
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.

Re:Jenkins Is Getting Old on Monday April 29, 2019 @04:30PM (#19782316)
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.

Re:Sensible Software Engineering on Sunday March 03, 2019 @04:35PM (#19297067)
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.

Re:De-facto closed source: the case for understandable software on Saturday December 01, 2018 @07:44AM (#18576535)
> 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.

Re:The Allure of Small Towns for Big City Freelancers on Sunday July 22, 2018 @12:26PM (#17587511)
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.
The VPN has as much a view in your traffic as your ISP or mobile carrier, for what it's worth.
Inflation won’t do anything to your fixed-rate debt, but hopefully it will increase your wages to make the debt easier to pay.
Re:HR has lost the trust of employees on Saturday February 10, 2018 @04:27PM (#16349700)
Then why not a contractor? If you trust nobody, at least you can protect yourself with a contact.
Re:HR has lost the trust of employees on Saturday February 10, 2018 @04:17PM (#16349651)
I am sure everyone has stories about how awful their HR department it, but if you do not trust HR, then who do you trust in your company? Your boss? Nobody?

And, assuming you are a white collar worker (like a programmer) with a full-time permanent job, if you do not trust anybody where you work, why have a permanent position? Why not either become a contractor, or join a job with a union to collectively bargain for you? Are you not the ultimate chump in participating in a system where you are bargaining implicitly from the weakest position?

Pandemic Legacy is a real gem. Me and my friends are having a great time playing it. Even if you have played pandemic to death, the twists at every month make each game distinct and encourages you to try different strategies and characters.
Re:The software engineering notebook on Saturday October 14, 2017 @06:27PM (#15474678)
Also have a very quick search, which beats any server based wiki.
Re:Writing a SQLite clone from scratch in C on Monday September 04, 2017 @12:51PM (#15169370)
Berkley DB just stores byte arrays, so it is not 'typed' either.
Re:Writing a SQLite clone from scratch in C on Monday September 04, 2017 @12:50PM (#15169361)
I'd just write protobuf "blobs" or other serialization format n in an sqlite text column. If you need to query across the typed data, you could build an index in another column from the data in your protobuf blob.
Re:Basecamp Employee Handbook on Tuesday May 02, 2017 @01:52PM (#14248750)
It's paid out of unemployment insurance funds from the government.
Re:OpenBSD 6.1 is not a CD release on Sunday April 16, 2017 @09:09AM (#14125647)
I guess CDs were not a revenue source after all:

"> If no OpenBSD CDs are going to be released, then probably it is better > to just send a donation to the OpenBSD foundation and/or to Theo de > Raadt.

Vijay, that is the correct way to sustain the software.

The CDs haven't pulled in sustaining revenue for many years.

Based upon income from contributors the Foundation performs a fantastic function -- making worries and problems disappear."

Re:Ask HN: How would you turn Twitter around? on Tuesday February 28, 2017 @12:39PM (#13755611)
How's that working for reddit?
Re:What would Britain be without drink? (2016) on Saturday February 04, 2017 @01:43PM (#13568275)
Maybe if you take a drink or two, you'll cheer up!
Re:Microsoft security guru: Jot down your passwords (2005) on Friday December 09, 2016 @01:45PM (#13140801)
Well, the master password is complex enough to have to really guess at it, even if they had the raw keepass file. And I can change it regularly without affecting any other login.

If someone does crack it, at least I have a handy database of websites and logins I have to change the password for.

Re:Microsoft security guru: Jot down your passwords (2005) on Friday December 09, 2016 @01:04PM (#13140433)
I keep a keepass file in dropbox, and Minikeepass/dropbox client on my phone. I memorize the keepass password, can access any password from my phone, but I can also access my dropbox/keepass file from any computer if I lose my phone/it's unpowered/etc.
Re:What’s New In Python 3.6 on Wednesday December 07, 2016 @10:35AM (#13123236)
I do not know which feature I will miss the most whenever I have to use older versions of python, either the f-string interpolation or the underscores in numeric literals.
Re:Using the 2016 MacBook Pro as a development machine on Tuesday December 06, 2016 @10:56AM (#13115491)
You can switch the capslock key for escape if you really miss it. It's under System Preferences > Keyboard > Modifier Keys.
Re:Belgium and the Netherlands Swap Land, and Remain Friends on Tuesday November 29, 2016 @03:28PM (#13065984)
Well, it's un-inhabited, so it's a lot easier to swap, as opposed to exclaves who usually have inhabitants who would not be too happy to switch nationality.
Re:The lack of a case against Python 3 on Tuesday November 29, 2016 @09:39AM (#13063254)
I use a site like http://lingojam.com/FancyTextGenerator to generate π–šπ–˜π–Šπ–‹π–šπ–‘ π–™π–Šπ–˜π–™ 𝖉𝖆𝖙𝖆.

The only downside is that it has taught me that my favourite debugger is not unicode safe :(

Re:The lack of a case against Python 3 on Tuesday November 29, 2016 @08:27AM (#13062870)
Pro tip: Use non-ascii characters in your test data. Instead of John Smith, try Helmut MΓΌller. This will make sure your code is unicode safe, and also make sure that external dependencies (hey, our spreadsheet library silently fails when a ΓΌ is in the file name!) also work correctly with unicode.

Older Β»