Better HN
topnewbestaskshowjobs
Log inSign up

satyenr

59 karma · joined Nov 17, 2018 (8y ago) · 68 submissions

[ my public key: https://keybase.io/satyenr; my proof: https://keybase.io/satyenr/sigs/BLIerp5ZZ46-jaqHqgTpva-HIW8fSt-GxlizhY1TM9Q ]
Submissions

comment 6y ago · link · parent

You might want to look at Palm Phone — https://palm.com/?gclid=CjwKCAjwhOD0BRAQEiwAK7JHmGrU18EVG1ha...

comment 6y ago · link · parent

Why does default build process matter? Once you haven figured it out and automated it (say, using a makefile), it doesn’t matter whether you’re using a default build process or not.

Also, the likes of Haskell let you build binaries dependent only on OS provided libraries whereas the likes of Nim compile to C. You might want to play with the short listed languages to get an idea. A simple Hello World will tell you what they link with by default. Anything beyond that is up to you.

comment 6y ago · link · parent

C, C++, D, Nim, Haskell, OCaml, Rust, Swift, Objective-C, Crystal..... the list goes on. Many of the languages have a native code implementation in addition to an interpreter or a byte code compiler — e.g. Common Lisp (SBCL), Scheme (Chicken Scheme), Kotlin/Native.....

comment 6y ago · link · parent

Doesn’t LastPass Authenticator suffer from the same problem? If I understand correctly, they store the MFA secret in the same account — meaning if your LastPass vault is breached somehow, so is your MFA.

5.

Ask HN: Do you use your password manager to generate MFA codes?

2 points · by satyenr · 6y ago · 2 comments

comment 6y ago · link · parent

https://swift.org/download/#releases

comment 6y ago · link · parent

The last I checked, Swift is not supported on Windows — and Linux support is tentative at beat. I mean, only Ubuntu is officially supported.

comment 6y ago · link · parent

That — and I am not a big fan of browsers getting more and more access to the hardware/OS over time.

comment 6y ago · link · parent

Download and run code written by strangers without understanding what it does — what could possibly go wrong?

https://www.zdnet.com/article/two-malicious-python-libraries...

Ironic that this was published today. :-)

10.

The Galaxy Note 10 is now rumored to have an Exynos processor in the U.S.(androidcentral.com ↗)

1 points · by satyenr · 7y ago · discuss

11.

Object-Oriented Programming – The Trillion Dollar Disaster(medium.com ↗)

13 points · by satyenr · 7y ago · 1 comment

comment 7y ago · link · parent

Previously discussed at https://news.ycombinator.com/item?id=20029966

comment 7y ago · link · parent

Do you really want to compare Photoshop with VSCode?

comment 7y ago · link · parent

> At #5, you have code that is as fast as it gets. It is nowhere near as fast as native code (any benchmarks you think of are synthetic and designed to show JavaScript as fast—it doesn't take a lot to shake out the issues).

This. And to make matters worse, a lot of benchmarks start with something like, "To be fair to <the slower language>, let's cripple <the faster language> by implementing the programs using the paradigm favored by <the slower language>." If you want the real results, have an expert in each language implement the spec without looking at the other program.

Someone mentioned Photoshop being slow compared to Slack/VSCode. That is Apples to Oranges comparison if I ever saw one.

> And the disadvantage is that they are are huge, resource intensive and pathetically slow.

And don't work natively on any platform. You essentially program for the lowest common denominator and do not take advantage of any of the features provided by the platform -- especially accessibility. For example: Zoom In on any half-way decent editor increases the text size. Zoom In on VSCode (macOS) blows up the entire UI -- leaving little space for actual text. This is just one example -- I can line up many more.

comment 7y ago · link · parent

> Advantage of web app is cross platform uniformity. Write once, run everywhere.

In theory -- yes. But in practice, it is write once, debug anywhere. Remember a certain electron app consuming 100% CPU for a blinking cursor on a certain platform?

comment 7y ago · link · parent

> fast featureless editors like Sublime Text, Gedit, Notepad++, Vim/Emacs etc.

How do you count any of these editors — especially Sublime, Vim and Emacs — as featureless? If anything, Vim and Emacs are more fully featured than VSCode and Sublime Text not exactly far behind. I haven’t used the other two during the last few years, so can’t really comment on the state of plugin ecosystem for them.

comment 7y ago · link · parent

Because Venus’ atmosphere is full of Sulphuric Acid and various greenhouse gases which wouldn’t allow life as we know it to exist.

comment 7y ago · link · parent

Rust? I know a lot of people evangelise rust — to the point of annoyance of others — but as we move into an era where the entire world is run on computers, it is just not acceptable to have decades old infrastructure susceptible to bugs often caused by someone not understanding undefined or implementation dependent behaviour.

comment 7y ago · link · parent

What a lot of people don’t get is that it’s not pointers or manual memory management or even lack of language level support for “modern features” like object oriented programming, exceptions etc. that make C a pain to use. No it is the undefined and implementation dependent behaviours. There are simply so many of them that even experienced C programmers may, at times, run into trouble.

C is essentially a portable assembler. It’s not enough to learn the language, you need to have deep understanding of the underlying hardware and compiler infrastructure.

comment 7y ago · link · parent

Well, a lot of aluminium cans are left un-recycled — especially in developing countries.

comment 7y ago · link · parent

On one hand, this seems like a terrible waste of metal. But at the same time, it reduces the amount of plastic bottles. Depends on how cans are recycled, I guess. Also, a plastic bottle can be reused, but a can can’t be.

22.

Would you drink water out of a can? Pepsi wants to find out(ecoti.in ↗)

1 points · by satyenr · 7y ago · 6 comments

comment 7y ago · link · parent

See my top level comment on this post.

comment 7y ago · link · parent

If you read my top level comment on this thread, you’ll notice I am saying exactly that — over use of anything is bad — as is inappropriate use.

comment 7y ago · link · parent

Yup, seems like the author had trouble following badly written abstraction and/or indirection and came up with the idea that they are bad.

Abstractions are invaluable if you are dealing with a large codebase. Even the original author can’t keep everything in their head.

Indirections are invaluable if you want to be able to modify code in the future without making a gigantic mess — and potentially breaking compatibility in the process.

comment 7y ago · link · parent

I don’t quite get the point of article. It essentially boils down to:

“Abstractions — or rather, indirections — are bad for for readability, but they are good in some cases.”

Umm... this can be said for pretty much anything. Over use of anything is bad. Inappropriate use of anything is bad.

> Mostly, I want authors to be aware that there is a human cost to indirection that is felt more acutely by everyone reading the code except the original author.

Sure. It’s a well known fact that abstractions have associated costs — nothing new there. However, the author seems to forget that not abstracting things can be equally costly — even when human readability is concerned.

Imagine someone trying to figure our the business logic be reading code. All they need to know is some conditions are being met for certain steps to be executed. The actual steps involved in the check are irrelevant to the business logic. The condition can be modelled separately from the business logic and can even change independently. For example:

    def is_foo_condition_satisfied((self):
        return self.variable.startswith(‘foo’)
In this case, it just happens that the satisfaction of a condition is implemented as prefix check. In the future, it might be changed to checking a flag or reading a database, or anything really. If you sprinkle the startswith() check all over you code, it will be hard to make the change. And it actually hurts readability. While reading a large codebase, you want to focus on specific parts of it — getting into the details of everything all at once does not make it easier.

The most important thing to note is — programming is not confined to s strict set of rules. It’s not an exact science. You can’t define a strict a rules that must be followed. What makes sense somewhere is completely useless elsewhere. The Linux Kernel is full of goto statements, despite the fact that goto is considered harmful.

Dogma Driven Programming must be avoided. Even well known programming practices are guidelines at best. One must evaluate whether a given rule fits a given situation.

Coming back to the example at hand, functions are meant to divide the program by the logical tasks being performed, not by number of lines or any other metric. As I said before, it’s more art than exact science.

Is the check for foolikeness of something a logically distinct task? It depends on the context. There is no way to write a cardinal rule either way.

PS. I sincerely hope no one comes to me for code review with a monolithic function because of all the inlining — citing this article as inspiration.

Edit: Typo correction.

comment 7y ago · link · parent

Are you sure you are talking about CarPlay? I could understand Android Auto to an extant -- it can be slightly confusing to the uninitiated, but CarPlay is just about as simple as you get -- at least in my experience.

(Please do not start a iOS vs Android battle over this comment -- this is simply my experience -- I use both on a daily basis -- your mileage may vary)

comment 7y ago · link · parent

That is a really good idea. Touch controls are nearly useless on a moving vehicle. It would be a lot better if Apple/Google came up with a standard tactile interface for their in-car offerings.

Don't get me wrong -- CarPlay/Android Auto are leagues ahead of what individual car makers have to offer. Having a standard system across all car makers is a good idea too. They just need to come up with a more tactile interface.

The touch screen doesn't necessarily have to go, though -- it could simply be disabled when the vehicle is moving.

Volkswagen, for example, have a rotary dial which lets you flip through all the items on the screen to select the one you like. It still requires the driver to glance at the screen, but at least it doesn't require them to touch the precise spot on the screen -- which IMO is more distracting. That said, even the rotary dial is not perfect as it can't be operated by touch only -- w/o taking your eyes off the road -- not unless you know the position of every single icon/control by heart.

123