News for hackers. Stuff that matters.

zeroimpl

There are many situations where a car is infinitely more practical, such as when you need to transport goods (eg shopping).

Before I had a car, I once bought a dumbbell set. Had to carry it 5 minutes to the bus stop. Box fell apart on the way. Bus driver wasn’t particularly patient with me needing multiple trips to get all pieces into and out of bus either.

Since I own a car and pay insurance, why would I bother with other forms of transit when they are slower and bring their own set of problems?

Re:PostgreSQL 13 on Thursday September 24, 2020 @07:02PM (#24584680)
Don’t your clients need their own connection pools anyways? Eg if the webserver isn’t pooling connections itself, that’s a problem regardless.
Re:Remove first 300M lines from 700 GB file on 1TB disk on Wednesday September 23, 2020 @08:34AM (#24566245)
It’s not like you can’t test your script on another file first. If it works fine on a 1GB file with 300K lines, why wouldn’t it then work on the real file?

What would you do when the next time this happens it’s 300B lines from a 1PB file?

Re:Let's Encrypt's New Root and Intermediate Certificates on Monday September 21, 2020 @09:48AM (#24543373)
Interesting, seems pretty similar to an Executive Summary which also would have been very useful here.
Re:Commerce Department Prohibits WeChat and TikTok Transactions on Friday September 18, 2020 @07:13PM (#24522767)
grift: noun, a petty or small-scale swindle.

graft: noun, a shoot or twig inserted into a slit on the trunk or stem of a living plant, from which it receives sap.

Edit: Ugh nevermind I found more definitions of graft. Google only showed the plant/medical-related ones by default.

Re:Why is Apple acting like an asshole? on Wednesday September 16, 2020 @09:11PM (#24500084)
Betas being available doesn’t solve the problem because you can’t submit updates compiled using beta versions.
The question cleverly prevented that - it said "non-Microsoft browsers"
The opening question here pre-supposes he was concerned. Unless the prior discussion had Gates explicitly saying he was concerned (which I assume it didn’t based on Gates asking about a document using the term), then it makes complete sense to me to respond with a question rather than an answer. I’d have probably gone with “When did I say I was concerned about non-Microsoft browsers in January 1996?”
Re:Checked exceptions: Java’s biggest mistake (2014) on Saturday September 12, 2020 @12:31AM (#24449858)
I've literally never seen somebody catch a SQLException and do nothing with it - you quickly learn that just doesn't work, and it would never pass a code review.

With respect to exposing implementation details:

If the caller is the one who passed in the connection, then it makes complete sense to throw a SQLException so the caller can deal with it.

If the connection was opened in your method, then yes you probably should wrap it, handle it properly and clean up the connnection, and then throw a different exception.

The only time it's ambiguous is if the connection came from an instance variable. That's often a poor design, but usually means it came indirectly from the caller and so it still makes sense to throw SQLException.

In general, SQLException works fairly well as a checked exception. If some code generates a SQLException, your transaction failed and you should generally abort it (or you can check the specific error code if you are prepared to handle anticipated failures such as a duplicate key error). If it generates any other exception, you can continue working with the database (such as saving the failure status to a table).

Re:Mathematicians should stop naming things after each other on Saturday September 05, 2020 @09:37PM (#24388295)
quicksort kind of proves that the names don't have to be particularly meaningful, just somewhat descriptive and unique. It's not like mergesort isn't quick.
No, but the grocery store can choose to not sell any product which does this.
That’s not the same thing at all. I’m saying that you bought the product from a grocery store, and the product itself contains information discouraging you from continuing to buy from the grocery store.

In the app case, you bought an IAP from Apple (I know it’s Facebook’s app, but that doesn’t change the fact that the transaction was executed by Apple) but somehow think it’s ok for there to be a note saying you can pay less if you buy it on your computer instead.

If I buy a box of cookies from a grocery store for $3, should I expect a note in the box which says I can buy them directly from the manufacturer for only $2?
What great features do Android users get as a result of being able to sideload apps which aren’t available on the App Store?

I believe the (weak) answer to the above is the answer to your question. Features are what matters to the majority of users. The ability to sideload apps itself is not.

The “legitimate websites” that disrespect privacy and security almost always do that in a way transparent to the user (ignoring the cookie prompts, but I don’t think that’s a fair comparison). For example, news websites could try and access my location info, but they don’t because there’s a permission prompt which would appear.
The only websites which would force you are:

- legitimate websites using this feature for valid purposes, such as to control devices on your local network

- targeted malware attacks trying to hack devices on your local network

I’m certain we will not start getting popups for this on any mainstream website.

So as long as this permissions thing is more than a simple yes/no dialog, I’m not worried.

I routinely operate on machines with gigabytes of memory, but rarely write pipelines which output gigabytes of data, so this has never been a concern for me. But even then, there’s still swap space which is effectively like using a temp file but lazier.

By the way, I think you’d be in even more trouble if you wrote:

    cat /dev/zero > a
Re:Apple to kill Epic’s accounts on Friday the 28th on Monday August 17, 2020 @11:10PM (#24194859)
What on earth are you talking about?

My response was based on the OP suggesting the account closure was based purely on the App Store policy violation. I’m pretty sure it’s based on more than that, such as the fact that Epic is suing them in bad faith.

There’s probably a million app developers which have violated the policies in some manner at some point and yet very few get blacklisted by Apple.

Re:Apple to kill Epic’s accounts on Friday the 28th on Monday August 17, 2020 @06:24PM (#24192961)
They are also being sued by Epic. Would you keep doing business with a company suing you?
Re:Big Sur: “Warning: PHP is not recommended” on Monday August 17, 2020 @09:30AM (#24187020)
Apache is also preinstalled. I use it to host some PHP scripts on my local network. The annoying thing is that every OS upgrade causes all the configuration files to get reset so I need to fix it every time. But it's just small enough of an annoyance that I haven't migrated to installing my own.
Re:SQLite 3.33 on Sunday August 16, 2020 @02:53PM (#24180187)
The idea of being able to update multiple tables in a single query this way is intriguing to me! But I like the fact that the Postgresql syntax makes it crystal clear which table is being updated.
Re:SQLite 3.33 on Sunday August 16, 2020 @10:43AM (#24178212)
I wonder if they could just make this syntax work in Postgres:

    UPDATE inventory 
    SET quantity = inventory.quantity - daily.amt
    FROM
        (SELECT sum(quantity) AS amt, itemId FROM sales GROUP BY 2) daily USING( itemId );
Basically just allowing a ON/USING clause after the first FROM entry as if it was joining to the table being updated.

Otherwise it's kind of annoying when you end up joining to several tables in the update, but have to use the WHERE clause to join back to the main table.

Re:I Love MDN, or the cult of the free in action on Saturday August 15, 2020 @12:51PM (#24170256)
Employees paying might make sense if the employees were paid on some sort of commission basis. Then it’s in the employees personal interest to find ways to make themselves more efficient so as to maximize their own income. But for a salaried employee, there is not enough incentive for them to pay out of their own pockets.

Basically the statement you made that employees are paid based on value delivered is not really accurate in most cases.

Re:Apple just kicked Fortnite off the App Store on Friday August 14, 2020 @07:26PM (#24164474)
I would prefer if businesses didn’t sell products at a loss. It just leads to dumb situations all over the place.
Re:What's new in PHP 8? on Friday August 14, 2020 @07:16PM (#24164386)
I’ve never used Perl but I periodically mistake eq and = in bash scripts. It’s quite annoying since there’s no obvious indication that one is for numbers and one is for strings.
Re:What's new in PHP 8? on Thursday August 13, 2020 @10:26PM (#24152508)
> Right now PHP 8 is in feature freeze, meaning no new features can be added anymore.

> Starting with new features, remember that PHP 8 is still in active development, so this list will grow over time.

Something doesn't seem right here :)

Were the files listed when going to http://server.com? No, the user had to:

1. Find the server via nmap

2. Guess at some URLs until the server finally responded with some hidden data.

While neither of those would require being an expert in the field, this is well beyond the realm of browsing public websites.

It's a fictitious example. I didn't say there was no weapon, nor said it was definitely theft. The point is that submitting a GET request in a public setting does not mean no crime.

Coercion can be the difference between asking for money and theft. In the case of this intel data, it was clearly coerced from a server - it's not like it was linked on Google, they had to specially craft URLs to coerce the data out.

That’s a very weak argument. If I’m walking down the street at night and somebody comes up to me and says “GET /money”, I may respond with an HTTP 200, but that doesn’t mean the person didn’t just steal from me.
Re:You don’t need reproducible builds on Wednesday August 05, 2020 @07:32PM (#24066755)
It really depends. If I’m building a Java project, I’m pretty sure I’ve got a deterministic build just by running javac pointed at a source directory. If I want a reproducible build, I probably need to do a lot more:

- ensure timestamps of all files embedded in jar files is consistent

- ensure there is no BuildTime/BuildHost/BuildNumber variable of any kind being captured

- ensure the exact version of compiler is documented

- ensure exact versions of all dependencies in classpath is captured

Older »