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

How can you tell someone is wrong in Programming?

Wrong outputs are checked by tests and you could do time studies.

However that's after-the-fact. With abstraction there isn't a correct answer from code alone (outside possibly nested loops)


I have one to bring up "for loops".

I think they are infinitely worse than while loops. (I ran into this specifically with Pandas dataframes/series)

You save 1 or 2 lines and have ambiguity on wherever "each" is.

Maybe static typing solves this, but I've decided I hate syntax sugar and dynamic typing.


Although for loops might all be while loops at heart, I think the distinction is more than just syntactic. Properly used, the use of a for loop conveys particular information: the code block is intended to run a set number of times or over a particular group of objects. This allows while loops in general to be used specifically for running the code block an indefinite number of times until the criteria is met. (Certainly both types of loops can be misused and abused.)

It also splits apart two different kinds of criteria. "Has this run ten times" is a different sort of question than "is the error within the given margin" or "does the temperature now read 60 degrees". (At least, if you're intentionally running the thing 10 times. If it's running incidentally so you don't even know if it will run 10 times then it can be the same sort of question, but in that case I'd argue you should use a while loop….)

> You save 1 or 2 lines and have ambiguity on wherever "each" is.

Like the sibling poster, I'm not certain what you mean by this.


You might have a good point, but you haven't given enough code to expresss your idea.

What is "each" ?


Who is the demographic for this? Professionals will be using multithreading and/or multiple computers for these problems.

Maybe college kids?


You'd be surprised as to what professionals use.


Like what? I'm given a beefy computer to do my DS work.

Maybe I'm in my own bubble but does TF have small scale uses where you would run it on a laptop?


I know several data scientists (the whole team in my company and some people in others) who just use a laptop (and a Mac at that).

>Maybe I'm in my own bubble but does TF have small scale uses where you would run it on a laptop?

That, plus huge scale uses where it doesn't make sense to run on a beefy desktop even, so you just use whatever to deploy in a remote cloud/cluster/etc. A laptop means you can do it from wherever, and a laptop with good specs/battery means you can do all other stuff, for longer, with it...


This is how I use coinbase. I have some Bitcoin for free and instant payments.

I'm not saying where most of my Bitcoin is.


No idea why you are downvoted.

Although the term is "inflation hedged asset"


I liked it when I went to Europe. I ran out of Euros and got some from a Bitcoin ATM at a university for less than the bank fee.

This was a few years ago, fees are probably higher now... Which negates your insistence that the technology is the value.


> This was a few years ago, fees are probably higher now

Anecdote: I have a U.S. online bank account with no minimums or maintenance fees. Travelled to Europe a few months ago. Took out Euros with the ATM fee reimbursed by my bank and an implied FX spread less than 1% to spot.


I think many of us have tried our best to teach people about "shitcoins", but the greed and fantasy of riches has caused lots of people to buy Bitcoin copypastes.

The most recent round of dissapointment comes from blockchains being too expensive to use as write only databases, yet people using it for trivial means like crypto kitties.

I predict the next issue will again be unrelated to Bitcoin, but rather non POW coins getting hacked.


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

Search: