Better HN
topnewbestaskshowjobs
Log inSign up

unpythonic

502 karma · joined Sep 23, 2016 (10y ago) · 65 submissions

Submissions

comment 2y ago · link · parent

The other article fails to mention the building vs land+building valuation. I posted it over there, but thought this was a better article on its own.

2.

97% Off? Values of Old Office Towers Go to Near-Zero, but the Land Has Value(wolfstreet.com ↗)

3 points · by unpythonic · 2y ago · 3 comments

comment 2y ago · link · parent

Here's a better article covering this situation: https://wolfstreet.com/2024/08/01/values-of-old-office-tower...

Unsurprising that a building's value goes down over time while the land on which it resides appreciates. The 97% discount is a comparison of the building price versus the building + land price, so the 97% isn't very relevant.

4.

White House Urges Developers to Avoid C and C++(tomshardware.com ↗)

4 points · by unpythonic · 2y ago · discuss

comment 3y ago · link · parent

Sadly, it's not always that simple. If one of your well-pinned packages has a build dependency which is not correctly pinned, then you're subject to the problem.

comment 3y ago · link · parent

Oh yeah! Perl sure did have a bunch of ugly programs, but I believe that was because it was so easy for non-experts to program in it. There have been many companies successfully built atop of a Perl code base, and I've seen fantastic systems built with it. I've also seen one-off programs handed from manager to manager which would scare you to death.

comment 3y ago · link · parent

Horror is apt.

You hit it on the head with the slowness of loops when the body comprises a series of program invocations. The horror really seeps in when you realize the original author wasn't stopped by the lack of data structures: they could get around that with some creative variable names.

comment 3y ago · link · parent

The effortless composition of complex commands out of simple standalone programs is one of the best features of Unix. And yes, I admire and love it as well.

That said, imagine a metrics system for a huge networking company that used these methods to cover all automated testing or defect analysis. Those inner loops were made of greps and seds and so forth, and each one is the invocation of a new program. It wasn't uncommon for these runs to take almost a day.

Besides performance, the other nightmare was was someone described below: each script was a one-off that didn't leverage the work from others. If the author only new C shell, then you know you're going to be doing gymnastics to catch the stderr of some of those programs (you can't capture it in the same manner that Bourne variants do).

Anyway, yes, we all adore the Unix philosophy, but there are limits.

comment 3y ago · link · parent

When perl came out we were living in horrific times. You had the choice of either Bourne, C or Korn shell. Automation was glued together in one of these with a series of grep, awk, sed, ls, test, commands glued together. Anything more complicated was written in C and called from one of these things.

Perl in one stroke collapsed the programming of C, text manipulation, the capabilities of all of the Unix utilities, and data structures into one system. For anything which wasn't subsumed into the monolith of Perl, you could easy access via backticks. It was very friendly in dealing with text streams, and that's what those call-outs in those back ticks spoke.

Yes, awk and sed were replaced by Perl, but more importantly, the unmaintainable nightmare that glued all of it together was wiped out.

comment 3y ago · link · parent

I was an innkeeper, in this crazy, little town in Vermont...

https://youtu.be/OwYw2i2icNg?t=430

comment 4y ago · link · parent

The claim: reduces CO₂e emissions by up to 80%*

The asterisk: water boiling phase excluded

When I boil pasta, I use full heat to get the water boiling, drop in the pasta, then let it come back up to a boil, then drop the temperature as low as possible to keep a slow boil going--about medium-low.

Guesstimating that the boil takes about as long as the time to cook the pasta, I'd say that the pasta cooking portion only takes up about 1/3 of the energy of the total (cold pot to cooked pasta).

The 80% savings only covers the pasta cooking phase, so overall, it's only saving 4/15 or 27% (roughly). If you use a lot more water, then that initial boil time further reduces your savings.

comment 4y ago · link · parent

If you google your question, you literally get a set of videos showing you how to do it.

"oneplus 10 pro qr": https://www.google.com/search?q=OnePlus+10+Pro+qr

In 30 seconds, I found that you can do it by using the Google Lens feature, which is a button to the left of your zoom button in your camera app. If you don't want to use that, you can use google lens directly.

comment 4y ago · link · parent

After all, they're pigs on the wing.

https://www.mentalfloss.com/article/79160/time-pink-floyds-g...

comment 4y ago · link · parent

If you read through to the bottom, you'll see the article itself is just a call to action for yet another service which the author is starting. It's an ad. Seeing it buried so deep doesn't make me feel that the author has any better intentions than Google itself -- credibility already gone.

comment 4y ago · link · parent

The article is just an ad.

> This was my motivation for starting GlacierMD: I wanted to give consumers the information they needed to make evidence-based health decisions. And although I lost that battle (spectacularly) I'm still fighting the war! If this is a topic that interests you, I'd urge you to

comment 5y ago · link · parent

Fascinating article which explains the seeming contradiction between China's crackdown on some of the most visible tech companies (Alibaba, Tencent) and it's new emphasis on tech growth.

17.

What tech does China want? Communist Party’s masterplan for its tech industry(economist.com ↗)

4 points · by unpythonic · 5y ago · 1 comment

comment 5y ago · link · parent

And here are the headers:

    # curl -i https://www.facebook.com/
    HTTP/1.1 500 Internal Server Error
    X-Frame-Options: DENY
    X-XSS-Protection: 0
    X-Content-Type-Options: nosniff
    Strict-Transport-Security: max-age=15552000; preload
    Set-Cookie: ...
    Expires: Sat, 01 Jan 2000 00:00:00 GMT
    Cache-Control: private, no-cache, no-store, must-revalidate
    Vary: Accept-Encoding
    Pragma: no-cache
    x-fb-rlafr: 0
    Content-Type: text/html; charset="utf-8"
    X-FB-Debug: ...
    Date: Thu, 08 Apr 2021 21:41:49 GMT
    Priority: u=3,i
    Transfer-Encoding: chunked
    Alt-Svc: h3-29=":443"; ma=3600,h3-27=":443"; ma=3600
    Connection: keep-alive

    <!DOCTYPE html><html lang="en" id="facebook"><head><title>Error</title>...

comment 5y ago · link · parent

Because ctrl-z will stop the current command, and when you run "fg" it resumes that one process. However, the loop you were in has been abandoned, and it will not continue to execute.

For example, try it with this:

    for N in $(seq 10); do echo $N; sleep 1; echo $N; done
You'll see something like this:

    $ for N in $(seq 10); do echo $N; sleep 1; echo $N; done
    1
    1
    2
    ^Z
    [1]+  Stopped                 sleep 1
    $ fg
    sleep 1
    $

comment 6y ago · link · parent

Let's begin at the beginning, Chapter da39a3ee5e6b4b0d3255bfef95601890afd80709.

Of course, that's tongue-in-cheek. It all began with e83c5163316f89bfbde7d9ab23ca2e25604af290.

comment 6y ago · link · parent

> Programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%.

Knuth, "Structured Programming with Goto Statements". Computing Surveys 6:4 (December 1974), pp. 261–301, §1. doi:10.1145/356635.356640

No one has said to ignore optimization, what the quote is actually telling us is to avoid falling into the trap of micro-optimizations which don't really affect the overall performance of the system. Yes, you can spend a week making the world's fastest substring-in-string function, but if you're only checking that your email address has an @ in it, that's kinda silly.

Make your programs fast by concentrating on the areas which give you the most bang for the buck and avoid falling into rat holes where you optimize something which has no impact on the system overall.

comment 6y ago · link · parent

I find it funny when satire from the past becomes the truth of the present. It's not hard to find examples such as the dystopian satire of "Network" (1976) becoming depressingly accurate.

In this case, Mitchell & Webb performed a sketch on the power of having just shy of two drinks. The Inebriati is "a group bound by the creed that humanity is better and more noble after very nearly two drinks than at any other time."

Video here: https://streamable.com/wtsn

23.

Former Twitter Employees Charged with Spying for Saudi Arabia(nytimes.com ↗)

95 points · by unpythonic · 7y ago · 4 comments

comment 7y ago · link · parent

Saying that Perl was one of the first languages is silly of course. It's nowhere near as old as LISP, FORTRAN, and C.

However, Perl is the first of its kind. Prior to Perl, one would have to hack together in either Bourne or C-shell a series of commands all strung together, poorly. Grep, sed, awk, and a slew of utilities were strung together poorly with any specialized manipulations coded in and compiled from C.

Perl was the first popular language that gave us first class data structures (arrays and hashes) along with the programming structures we were familiar with in C. The inline regex support obviated the need for sed and awk gymnastics to the relief of many.

All of the crazy things in Perl that drive so many people nuts today were derived from the shell scripting that everyone was familiar with at the time. Error codes in "$!", that seems familiar, if you're used to /bin/sh. Perl's syntax which mapped shell script idioms directly into language features made these conversions a breeze.

Perl was the first and best at being able to convert these awful shell scripts into something which was maintainable. This was also Perl's primary downfall. Because it was so easy to use, lots of people who were not first-class programmers were able to write a lot of not-so-nice scripts which made later programmers sad and angry. It was a victim of its own success.

comment 7y ago · link · parent

Not sure why we don't refer to the original reporting from which this was based:

"When rides go wrong: How Uber’s investigations unit works to limit the company’s liability"

https://www.washingtonpost.com/technology/2019/09/25/ubers-i...

comment 7y ago · link · parent

The New York Times ran an article yesterday covering the same topic. I don't have a WSJ subscription, so I don't know if they reference the New York Times article.

"How Apple’s Apps Topped Rivals in the App Store It Controls", Sept 9, 2019

https://www.nytimes.com/interactive/2019/09/09/technology/ap...

comment 7y ago · link · parent

I get the feeling he was looking at a world map with a Mercator projection.

comment 7y ago · link · parent

As referenced from "Facebook Under Oath: You Have No Expectation of Privacy", https://www.nytimes.com/2019/06/18/opinion/facebook-court-pr...

A very interesting dialog between a US District court judge and a Facebook lawyer on how Facebook feels about privacy.

It seems that when pressed, Facebook says that as soon as you have shared anything to anyone, even if you have your sharing settings tightly controlled, you have no expectation of privacy with regard to that information.

29.

Facebook, Inc Consumer Privacy Litigation(documentcloud.org ↗)

2 points · by unpythonic · 7y ago · 1 comment

comment 8y ago · link · parent

As much as the Common Core standards are criticized here in California, I have to say that the emphasis on the "why" behind every operation is really fantastic. It's usually in the last section of each homework, but it provides a good discussion point when going over the homework each night.

Asking students to answer questions like the following are easy to zip through, but they provide a good place to pause and find a way to connect the physical mechanics of a solution to the reasoning behind it: "How would you explain to someone else why the fraction 1/2 greater than 1/4?" or "Why doesn't angle-angle-angle show congruence but angle-side-angle does?"

I've also noticed that the Common Core brings in advanced topics earlier without announcing to the student that it is an advanced topic. Ideas from algebra are brought in at natural points of the discussion rather than making a big deal of it. By the time that they realize they're learning algebra, they are already into many of the "rules" that would have otherwise been taught by rote. If you understand why you have to multiply both sides 5 to find out x/5 = 30, it feels much less arbitrary when the rules are made more explicit later.

123