Hacker News new | past | comments | ask | show | jobs | submit login

> I’m prevented from ever achieving a fluid coding style because the coding is not coming entirely from my head. My coding has become a constant dialog with IntelliSense.

This.

Code should live in your head. You shouldn't need intellisense to see that a property doesn't exist in an object. I hate code completion, most of the time it gets in the way of your thought process. Even if it can gain you a little speed increase, it still is better to write things down for your 'codebase memory'.

That's why I despise the current web development stack. You need Typescript, otherwise you might make a mistake with types? Never had that problem in the past. And just like typo's I make mistakes a once in a while, but that's OK because it helps me to learn the codebase better. You need a linter? Same story, it's always in the way as if it is more capable than me writing code. Prettier? It automatically formats your code, so the codebase doesn't resemble the one in your head anymore.

I know it does work for some people and I can totally imagine that for a beginner developer it can make the difference, but for me it doesn't. In the current/modern web stack I feel like having brick walls everywhere around me and my code is definitely not getting better from it, I'm just constantly struggling with all those 'handy' and 'necessary' tools while my code memory deteriorates. Even worse is that on almost any project I professionally work on requires all those tools, not using them makes me an amateur, even in the eyes of junior dev's.

I believe in writing every character of my code and testing it thoroughly, I wrote many bug free codebases with it, that's my experience.




You shouldn't need intellisense to see that a property doesn't exist in an object.

So what do you do instead? Not just for intellisense but all other possible code completion solutions? Does that mean you always manually open a source file and look for the name of the function/member/whatever you need, then either copy/paste or manually type it? And try to remember all of them to avoid having to do that process again? I've done that from time to time and still do but it's just slower than intellisense and the likes, always.


Clearly, you just memorise / know everything. Jokes aside, there is a balance to be had between having to look up trivial, everyday things via intellisense, and expecting people to know every single method on a massive set of libraries. I'm always surprised by people who claim that the latter approach is a good investment of their time and mental capacity. At some scale, it simply cannot be optimal.


>At some scale, it simply cannot be optimal.

Time spent memorizing APIs is time that could be spent learning new problem solving techniques or interesting algorithms.

These folks have bad opportunity cost assessments. There's always some piece of knowledge more useful for memorization than an API function.


I think one problem is that some of these sorts of things always pop info up at you, instead of you the coder pressing a keystroke to have it help you.

There's 3 different models that happen:

1. Type in the entire thing

2. Type in a unique portion and ask it to autocomplete

3. On each keystroke, evaluate if the list of auto-popped-up completions to see if the one you want is quickly available yet.

Clearly the 3rd is slowest to interact with, and does not convey useful information for familiar interfaces.

If you do not know or cannot remember what the interface looks like, it might be a bit more useful, but gives you similar information as the 2nd above when you have little to autocomplete. But the 2nd option still leaves you in control of the coding flow instead of the system constantly interrupting you to ask you if it knows what you mean yet.


I genuinely cannot tell if this is supposed to be satire or not.


Not satire, just hacker news.


As a sidenote: Did you know about Poe's law? :)

https://en.wikipedia.org/wiki/Poe%27s_law


> I can totally imagine that for a beginner developer it can make the difference... I believe in writing every character of my code and testing it thoroughly, I wrote many bug free codebases with it, that's my experience.

I'm entirely split between vigorous agreement and shaking my head.

At some point I just lost interest in committing various interfaces to working memory. The more trivial the more virulent my disinterest. Web stuff, especially front end? Unless it's crucial UX for something Very Important, it's just not worth the effort. Bring on the program synthesizers, even if they're limited to tab completing. I would literally rather memorize gibberish. If I wanted to memorize things I don't actually need to, I would've gone to med school.

At the same time, for code that actually matters and requires deep thought, I type every character and think about each one a lot.

Hopefully at some point program synthesis will be good enough that we don't have to make this choice. In the meantime, pretty much everyone doing something other than code-for-the-sake-of-code is writing some software where understanding every character really matters and some software that just needs to do the dumb thing right more than half the time to be worth it.

> It automatically formats your code, so the codebase doesn't resemble the one in your head anymore.

Same thing. One the one hand, your coworkers are not your psychologists. On the other hand, who is going to explain the code if you can't? And again, the resolution is: does this code being correct really matter?


I had the same reaction as you, for the same reasons. That said, I'm a bit more skeptical about the proliferation of automated code formatters run e.g. as pre-commit hooks. A project-wide consistent formatting style is the right thing to have in 90% of the cases, but neither the style guides nor the tools enforcing them are perfect. There are situations where a particular piece of code will suffer a readability penalty if formatted in a standard way. For those situations, the formatter must have a way to locally disable it.


> You shouldn't need intellisense to see that a property doesn't exist in an object.

I think, this is simply not possible nowadays in any professional environment, involving multiple players.

There are way too many frameworks within which you have to find your way relatively quickly and nevertheless often only for a short time. Many with idiosyncrasies, sub-par design, the wrong smell or simply not satisfying the own taste one way or another.

With C++ almost my first language, I was using Qt for many years. It was almost the only framework fitting expectations more or less intuitively the whole time (at this moment, PyTorch fits a similar spot). This specific example hasn't to be true for everyone, of course. But there are always things on the other hand of the spectrum, for which I immediately forget syntactical peculiarities again and again. There seems some inner resistance, accelerating this for some software artefacts. I have seen this this seemingly feeble aesthetic point with many - often very good - programmers, maintaining a strong inner image of the software they are responsible for.


> You shouldn't need intellisense to see that a property doesn't exist in an object.

I use code completion for exploratory programming all the time. Questions like "can I convert this to a string" become easy. My coding is much more fluid because of it - it's a dialog with an assistant - "help me with telling what you can do" - rather than me writing overly specific orders to a machine.


I think if I want to solve a problem, intellisense already became a requirement for me, since it does increase speed and I would say that this helps "fluidity".

I see some other side effects though and that regards labeling. I spend much less time on thinking about fitting ones since they would be auto-completed on later use anyway. If I don't have intellisense available I spend more time on thinking about names just because I need to remember them. That makes the code much more readable in some cases.

Exploring APIs can be much more enjoyable if you have it and there is no thorough documentation available on the other hand.

Still, some projects have a lot of constants and variables, so in that case it really helps.


> You need Typescript, otherwise you might make a mistake with types? Never had that problem in the past

Project size metrics needed.


> Code should live in your head. You shouldn't need intellisense to see that a property doesn't exist in an object.

That may be well and good for you, but not everyone's brain works like that. My brain is more GPU than CPU: I don't deal well with holding lots of disparate pieces of information in working memory, but I can quickly look at a problem and see many solutions as routes of data through black boxes, and determine what pipes need to plumb to where.

Why should I waste time and neural cycles on code "living" (e.g. interpreting state) in my head, when I have a perfectly good "head" for it right in front of me? Types? Linter? Formatting? That's wasted focus that could be going towards cybernetics, architecture, API ergonomics, and performance.

Before IDEs, I had a tight loop of write code, run it in repl, squash bugs, repeat. Productivity skyrocketed once I started using Spyder/codeblocks, then once again in Pycharm/Clion, and then once again when I started using type hints in python. I just started using TabNine and it's like finally I feel like my code can keep up with my brain.

Www.tabnine.com


> Even if it can gain you a little speed increase, it still is better to write things down for your 'codebase memory'.

> [...] You need Typescript, otherwise you might make a mistake with types?

You can use your 'codebase memory' instead.


Intellisense allows me to write code without having to check definitions of types that I'm using.

e.g I'm using type<Person> and I can just check list of its properties at current place instead of having to go to the definition

same with liberaries, despite that it may not be the smartest thing to do (you should check docs) it works fine very often


>I wrote many bug free codebases with it, that's my experience.

Prove it. You seem to be claiming to be qualitatively superior to most developers, since most developers use an IDE or tool of some sort, so let's see an example of this nontrivial bug free code you've written.


Especially the tests should prove it. In almost none of the comments I see thorough testing is taken into consideration. No IDE can replace good tests today AFAIK.


Without types you need more tests to have confidence though.


That's as easy to prove as that there isn't an invisible, indetectable pink unicorn standing right behind you as you read this.


I'm as confident that there isn't an invisible, indetectable pink unicorn standing behind me as I am that someone has written multiple complex and bug-free applications working only from their memory of a language and codebase. Not even Don Knuth is that much of a savant.

At the very least, the quality of such code should be self-evident and instructive.


As you gain more experience in software development, you'll look back at this post and laugh.


You must work on really simple projects




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

Search: