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

Which is fair play.

I fully expect authorities from any countries to try to get evidences from physical access to electronic devices in the case of criminal investigation. Just like they can go into ones house and open safes with a torch if a judge allows it.

The problem is mass surveillance, not getting data about someone under arrest.

Of course, I unfortunatly also fully expect them to abuse that and use it outside of criminal investigations, without the knowledge of said person.


No, the problem is backdoors and misleading information.


That as well.

Apple may state that their enclave is secure, the existance of such tools and the fact they were part of PRISM hints that they are like all others: open to those with a lot of resources.


In this type of blog post with comparisons including many languages, you usually see some unatural approach for your favorite language.

However, in this case, the Python example is idiomatic.

Since the articles calls for better approaches, I would suggest to take the opportunity to use the walrus operator and rsplit() for the optimized version. Something like this:

    reminding = ""
    c=Counter( )
    while (chunk := sys.stdin.read(64 * 1024)):
        pre, post = chunk.lower().rsplit('\n', 1)
        c.update((reminding + pre ).split())
        reminding = post
It should not affect performance too much, and the code gets more expressive.

However, the performances will be quite different depending of the python version you use. Interestingly, Python 3.11 beta, which comes with a lot performance tweaks, is slower for this exercice, while being reported to be faster on real life tasks.


Your code assumes there is at least one newline in each 64K chunk, and assumes there are no words past the final newline.

It will fail on "abc" and give the wrong answer for "abc\ndef".

I prefer rpartition over rsplit to handle first case, and the loop-and-a-half construct instead of the while+walrus operator to handle the second, as in this modified version of your code:

    remaining = ""
    c=Counter( )
    while True:
        chunk = sys.stdin.read(64 * 1024)
        if not chunk:
            if not remaining:
                break
            pre = post = ""
        else:
            pre, mid, post = chunk.lower().rpartition("\n")
        c.update((remaining + pre).split())
        remaining = post


Indeed, rpartition is better suited for this task.


Most of those things would be blocked by my adblockers. If you want to reach me, that's now how to do it.

People that managed to reach me did so by either:

- helping me solving one problem

- creating something that looked really cool and fun


There are a lot of reasons you can end up in this situation, and as many solutions to apply. Identifying the problems, choosing the appropriate solution and implementing it is a job.

You cannot learn an entire job from a HN post.

However, one solution can be used to solve all those problems: put a product manager in charge with a background in ergonomics (in the steve krug sense), and have this person steer the project from start to finish, with the legitimacy to direct people effort and choose policies.

The hard part now becomes to hire a good one.

A good one will know programming (Xor design), ergonomics and customer support. This person will know how to talk to the customer/end users, to the boss, but also to the designers and the devs.

Because eventually that's what it is about: having a good product vision, but being able to make sure this vision matches what the customers need, sell that to the boss, then direct the team to get it.

Expecting all of those people to behaved optimally is like hopping to win the lottery. It may happen, but chances are low:

- the boss may want fast things for cheap, or have another agenda/point of view about the project

- the customer don't know how to express what they really need. Sometimes they don't even know before you ask them.

- the designers are skilled at making visual things, but not all of them get out of their way to make sure they are making the visual things that are needed.

- the devs are skilled at making programs, but not all of them get out of their way to make sure they are making the things that are needed.

- they don't talk the same language, so every conversation means one should be capable and willing to make the effort of taking in a foreign jargon and context.

So unless you are very lucky to have most of those doing exactly what you want them to do, you need somebody that will steer the ship. And it's WAY easier to hire one single person with those skills than to make sure every single team member you hire is going to be able to see more than one's own area of expertise.

If you can't hire that person, then the next best thing is becoming that person.

In that case, you may want to read "Don't makes me think", all 37signals books, and "the mythical man month" for a first step into the marvelous world of building products with reality as it is, instead of what people wish it to be.

The rest of course is a lot of practice, talking to a lot of bosses, customers, designers and devs, then try to get the product in the right direction.

It's a long (yet interesting) journey, though, so good luck.


It reminded me of a youtube video were a chief was explaining how to cut vegetable quickly. One of the comment said: "I can cook diner with what this guy throws away".

Well years ago, I used to live an entire month on what this guy spend yearly on subscriptions.

I could now afford all this, but it still seems odd to me to spend so much on this.

I guess old habits die hard.


I traveled all around the world before Facebook was a thing, and it never prevented me from keeping in touch with the people that mattered.

What you realy mean is that you value more the convenience it offers that the price to pay for using it.


So did I. But things have changed, and some of those people with whom I remained in contact now use FB to the near exclusion of everything else.

These people are family in their 90s, for whom well-meaning children and grand-children have set up on FB. They don't use email, they can't write letters because of arthritis (and time delays ... international post can be very slow), and effectively the only async comms they use at all is FB.

I'd ask that you not try to tell me what I really mean.


I had the same situation with far away old people (grandmas in Venezuela, on in France, me living in Africa or Asia), some had problem with sight, earing, etc.

They didn't have internet.

We managed to get in touch.

> I'd ask that you not try to tell me what I really mean.

Manner of speaking.

The important is again that it is a matter of cost vs convenience.

I understand the cost can get pretty high.

Yet still, people kept in touch for decades with old distant relatives before the internet.

Using facebook is convenience, that's the point. It is very convenient.

It's the whole argument of this thread: the convenience eventually makes most people discard the cost of not using FB as too high, and the privacy things as not important enough compared to that.


They're 90? I wonder if it couldn't be replaced by a weekly phone call.


For reference, I'm 60, nearly 61, my mother is 90, nearly 91, and we are a long-lived family. I phone my mother three times a week.

For the rest, see my comment here: https://news.ycombinator.com/item?id=32131180


Yeah, for your mother definitely makes sense to already have more than one weekly phone call, but I was thinking about other family members.

Reading your post, it seems Facebook is a bit of a recreational activity to keep them sharp and social, which is good. What I was thinking is whether you need to participate in it, since the people this age I know is more than willing to keeping me up to date on all interesting stuff by talking. But of course each family is different so I'll just assume you know what you're doing!


In my experience, almost everybody over 60 really prefers to talk on the phone anyways


I'm over 60 and I hate talking to people on the phone. My mother likes it, and that's why I call her three times a week. But most of my aunts and uncles prefer to show their photos on FB and talk about what they're doing there. I call them for birthdays and special anniversaries, and having kept up-to-speed via FB means I can talk about things that really matter, or get clarification on things that weren't obvious.

But they like using FB, and it's the only effective way I know to stay in touch and remain a part of their lives.


> What you realy mean is that you value more the convenience it offers that the price to pay for using it.

People should be more charitable.

They said that they must stay in touch with these people and that these people can’t seem to use other things. Often times you have to stay in contact with family members because they aren’t able to properly care for themselves. Those same people may not have the ability to easily change how they interact with the digital world due to mental health issues and you have no choice but to meet them where they are.


I think this is largely a straw man, or taking an extreme case as representative.

I have friends that are not on Facebook. It requires more effort to stay in touch with them (for example, calling them on the phone) but it's doable. I don't see how a thing that was invented 10 years ago is now the sole method of communication with loved ones.

That said, I agree it's not without cost to delete Facebook.


Again, this is implying that the cost of another solution to all those problems is very high, and facebook is a very cheap, convenient solution.

So privacy is not important enough to justify those costs.


The craziest to me is that this is legal.

From the EU perspective, the USA seems to be going into a madness spiral.


I spent 20 years talking to friends and familly around me, and they don't care. They won't even try Firefox if they are used to chrome. Not even that small effort.

We had the US mass spying revealed in the press, with the PRISM program exposed. The public mostly carried on as usual.

Snowden got persecuted, giving the issue a lot of publicity. He wrote a very good book explaning why surveillance is dangerous. Again, most people didn't flinch.

A lot of people on HN reported trying to talk to people and get blank stares. "I have nothing to hide". "I don't care if people are collecting my data".

This is not just a failure in regulation: people don't give priority to problem that are not a pain right now. It's too abstract. Not to mention they have other problems that are a pain right now, and are armed with limited time, resources and knowledge.

Same problem with climate change. Their life is fine now. They can't care about the impact of their consumption in x year when they have to think about a loan, their health, the kids getting in trouble at school, their boss being pushy lately and the lattest form they have to fill.

There is also the cost of trying to avoid tracking product at the individual level.

I won't use Apple since it's locked down. So I use android. But I can't sign in into a google account or it will track everything. So I can't use the app store and many app won't work.

I can't use the best app provider like gmap and waze, have to sandbox youtube which mean it's mostly suggesting terrible content as it assumes I'm the average human.

I have a collections of extensions on web browser and several Firefox containers to isolate everything. Something I spent a lot of time to learn, master and configure.

I use Linux because Windows is tracking you, and MacOS is a golden cage. So I can't buy the best laptop CPU out there, which is the M2, and have terrible battery life.

My friends harassed me to have a FB account. Then an insta account. Then a whatsapp account. So I have to accept to miss out on things, and their nagging about it for every communication.

Now I am willing to accept all that because I think there are things more important in life than being part of a group chat or having the latest trendy thing.

But it's a hard sell for a many, espacially since, once again, "their life is fine right now".


You really can't force people to want something they don't want.


Python is used for Web dev (Django), geography (all SIG), system components (part of Unix), pen testing (E.G: scapy), 3d modeling (Blender), sysadmin (ansible), etc.

I've been coded mostly in Python for 15 years and using the scientific stack is a very small parts of what people pay me of, if they ever do.


You're misinterpreting that quote as criticism of Python instead of praise. He's not saying that's the ONLY thing that Python is good for.

I've also been programming in Python extensively for at least 20 years, including web application servers like Zope and TurboGears, embedding and extending apps and tools with the Python/C API and SWIG like SimCity, Gnu Radio, Big World MMPORG, robotics, simulations, Blender, Houdini, user interfaces like Tkinter and PyGTK and Sugar, XML processing, OLE integration, BeautifulSoup web page scraping, image processing, character animation, speech synthesis, system administration, infrastructure as code, machine learning, etc.

Python is of my primary programming languages, and I love it.

It's a GOOD thing that mathematicians use Python instead of Bash!


Mathematicians never used bash. Most of them didn't even touched the command line 10 years ago.

I'm not the one misinterpreting.


It's pretty clear and not subject to interpretation that I never claimed mathematicians ever used bash, but just the opposite: they use Python instead.

Bash is an easy way to plug other code together, but it's terrible for math. Python is a much better way to plug other code together, and it's much better at math.


>I'm not the one misinterpreting.

Yes you are. Forget the technical debate for a minute, the failure is in that you've misinterpreted the semantics of:

X is Y for Z

Y in this instance doesn't mean a tool/service historically used by Group Z, it's to illustrate that tool Y helped another unlisted group immensely.

Hence, the typical "this tool is Uber for..." way of trying to help people understand a startup.


If your argument requires me to "forget the technical debate for a minute" (and why should I?), and also you're nit picking at semantics with your own arbitrary definitions and personal interpretations, without any links or citations to back yourself up, you're really out on a limb there.

Do you really believe that I don't know what Python is good for after using it for over 20 years, working with clients including mathematicians, game designers, ai researchers, and my own personal open source projects like SimCity/Micropolis?

https://github.com/SimHacker/micropolis/tree/master/Micropol...

https://github.com/SimHacker/micropolis/tree/master/Micropol...

https://github.com/SimHacker/micropolis/tree/master/Micropol...

https://github.com/SimHacker/micropolis/tree/master/Micropol...

How many years have you been using Python for, and for what? Have some links you want to share to prove what you're saying?


I'm responding to the other person. Hence why the first line of my post is quoting them.


Swift has this as well, and it's really nice.

Doing map(lambda x: x + 1, stuff) or [x + 1 for x in stuff] adds nothing of value for those very simple cases. I wish we had map($1 + 1, stuff), or ever better, stuff |> $1 + 1.

Python does a lot of things right, but for a language with a strong emphasis on the iterator design pattern, I wish it would provide more expressive primitives.

However, it comes with the FP territory, which Python is not well suited for, and it would also imply a higher cost of entry to beginners.


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

Search: