
Postfix Code Completion in IntelliJ IDEA 13.1 - pgsandstrom
http://blog.jetbrains.com/idea/2014/03/postfix-completion/
======
benjamta
Looks like a nice implementation, and I really love JetBrains products, but
for me I just don't 'get' this (or most code completion in general).

For me, and it is a personal thing, actually writing code - that is physically
typing braces etc. is not the time consuming part of coding. Far, far more
time is spent thinking about my code than actually typing it. Shaving off a
few seconds when working in my editor feels like an optimisation too far,
especially if it essentially means learning new syntax.

Like I said, it's a personal thing - I know others have good reason to love
code completion tools. Now if someone could come up with something like this
for when I'm writing in my notebook....

~~~
alkonaut
Autocomplete/parameter help isn't about "hey, look fewer keystrokes!". It's
about context-aware lookup of what you need, and avoiding stupid mistaks
(reordering parameters, typos in method names).

The time it takes to write a the first few characters of a method name and
then hit the completion key is a tiny amount smaller than just typing the
method name outright. But that isn't the point: if I didn't have autocomplete,
I'd alt+tab to a browser with class documentation or start searching in the
code for a previous invocation of a method with that name I only vaguely
remember.

With autocomplete, I don't have to remember variable/property/method names, I
can either list them or see a list that begins if I just remember a prefix.
This is less unnecessary state in my head and thus more time to think about
the actual problem.

It's an absolutely _enormous_ difference in time spent, and considering the
time it takes to context switch back to where you were, I'd say it saves me
hours every day.

~~~
seanmcdirmid
This. Autocomplete is like GPS for writing code in the presence of large
libraries and complex APIs. It has nothing to do (at least now) with saving on
keystrokes, and intellisense marketing docs post 1997 exclude this as a
selling point.

~~~
dman
The flip side is that by lowering the cognitive burden it breaks the feedback
loop nudging programmers to create simple/elegant apis. I suspect we would be
seeing fewer complex api's if there was less of a reliance on IDE's.

~~~
seanmcdirmid
I'm not sure. You can look at dynamic language libraries and see similar
increases in complexity (batteries included began with python), while they
cannot benefit from code completion very much given a lack of static type
info. The increase in library complexity is probably more related to demands
on what we need to write where tooling is just a supporter.

~~~
dman
Java and Python are good languages to compare here since Java appears to have
the most money thrown at IDE's in the recent past. Python has a few IDE's but
theyre nowhere as magical as Java based IDE's. The average python api that I
have come across is usually much more concise than its Java equivalent and
there is a strong culture of dwim in the Python community. How much of this is
a result of the tooling support for either language and how much is a cultural
artifact of the respective community is an open question.

------
stevoski
This makes me want to have JetBrains' baby. Again.

If I had a baby for every time I've said that, I'd probably have a sizeable
brood by now.

~~~
Glide
I think I've persuaded higher ups to get JetBrains licenses at 2 of 3 places
I've been at now. There's hell to pay if I don't get my Reshaper/IDEA.

------
egeozcan
By the way, a similar plugin for ReSharper also exists: [https://resharper-
plugins.jetbrains.com/packages/ReSharper.P...](https://resharper-
plugins.jetbrains.com/packages/ReSharper.Postfix/)

~~~
muteh
They do credit that at the end of the linked blog post.

~~~
_djo_
In any case, the author and maintainer of that plugin is also a JetBrains
employee.

------
Ygg2
JetBrains really does an astounding job.

Also it seem Chronon debugger is free with IntelliJ IDEA 13.1 Ultimate
[http://blog.jetbrains.com/idea/2014/03/try-chronon-
debugger-...](http://blog.jetbrains.com/idea/2014/03/try-chronon-debugger-
with-intellij-idea-13-1-eap/)

~~~
snuxoll
Holy hell, that's awesome. I was reading through the blog and saw the
headline, immediately went to check out chronon and was about ready to throw
down the $60 for a personal license. Now I guess I don't have to :)

~~~
Ygg2
You can still drop those bucks if you need it for Eclipse and other IDEs :P

------
Karunamon
What excites me is the fact that when IntelliJ gets something cool like this,
that usually means its other language IDE's are not far behind (RubyMine for
instance..)

~~~
nikster
And AppCode...

AppCode is the reason I still have hair. If I had been using XCode for the
last 2 years I'd have it all pulled out by now. Or I might have given up on
iOS altogether.

------
nikster
This is probably just me but...

I often write code backwards using the IDE capabilities. Say I instantiate an
object, I'd write "[[Foo alloc] init]" (most of that auto-completed), then use
the keyboard shortcut to assign it to an appropriately classed and named local
variable.

It just seems redundant to write all of "Foo *foo = [[Foo alloc] init]". For
one you're typing the class twice - clearly redundant. Secondly, this is a
temporary local variable, it doesn't need a custom name. It shouldn't have a
custom name.

It's not so much about typing speed, more like a general dislike of
redundancy.

The theorem is the more redundant the language, the more IDE help it requires.
Objective-C is the worst I know. Although they're adding more and more layers
to the compiler to make it less so.

------
ctolsen
First thought: great, main.cf is always a pain to write.

------
agumonkey
Funny to conflate snippets with native methods. Looks like compiling smalltalk
to lower OOP.

------
wtbob
I thought that this was going to be about auto-completion of config files for
Postfix...

Neat idea, reminds me a bit of Reverse Polish Notation, Forth & friends.

Now it's got me wondering about a text editor built on RPN lines, kinda like
an inverted emacs + ed...

------
odonnellryan
This is really cool. One problem (yeah I know, Vim and Emacs commands are
useful here too!) I always had was going forward is easy in a text editor, but
going backwards a few characters, or to wrap something like this, is
inconvenient.

------
grdvnl
Nice. The most useful postfix completion I would be using in casting. It
involves a lot more jumps over braces to wrap around couple of casts.

------
jonesetc
This cannot get ported to PyCharm fast enough.

------
acc01
It's amazing what hoops people are keen to jump through so they don't have to
program in Forth.

~~~
emp
When I saw the headline the first thing I thought was April Fools had arrived
early in the form of a Forth IDE.

It is an appropriate name however. After dabbling in Forth for fun, I became
very aware how fleeting and unnecessary local variables are.

Since then I use these kinds of 'completions' by using the extract variable
refactorings, and various intent transformations - they added a syntax to
existing tools.

------
NextUserName
IntelliJ is great, but I personally have found this feature to be minimally
helpful and non-intuitive. I hope others benefit more than I have. Perhaps I
shouldn't knock it, but I think that the time could have been spent on more
worthwhile efficitncy improvements.

