Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
asgs112793yWriting code from memory by hand is not something a Developer does
I don't know about live templates but there is no shame in using a few snippets from SO or any other website as long as we know what we do -
I use them, they are a nice addition for productivity. Mainly they are useful when writing boilerplate code, if I find myself doing same things over and over on the project I write a live template for it (if it makes sense)
Yet there is one that rules them all for my work:
"_todo" template generates "// TODO (my_name) "
line, I work in a massive code base so having todo's automated is a nice feature.
I have many more templates and all start with "_" prefix for nice autocomplete -
@nemetepst only thing that sucks in intellij idea is that live template's name is case sensitive. for example shortcut "_recView" wouldnt pop up if I searched it with "_recview", so I'm forced to make all shortcuts in lowercase and sometimes its uncomfortable to read them.
-
Hazarth94843yI use them occasionally, but my job doesn't include a lot of boilerplate. But I still find them useful as shortcuts for writing something with a lot of annotations or when wanting to automate stuff regarding our coding standards
-
Hazarth94843yActually on top of Live Templates I also recommend the plugin Custom Postfix Templates. This allows you to write custom auto fills for when writing a dot after a variable. That can often save some good time too
-
@zemaitis Yea I solved this by using "_snake_case" convention for all templates, I like it this way because it intentionally goes against Java conventions. Which means when I search for live templates only they show up.
Maybe this helps?
Related Rants
Question for devs who use Intellij IDEA.
How often do you use livetemplates?
I am a new android dev with ADHD and just discovered live templates. They make my life much easier, for example I have shortcuts for generating recyclerview adapter/viewholder/implementation boilerplate code.
In that way I am able to focus on implementation, and do my coding like building blocks, rather than memorizing every detail of implementation. Also I don't need to go to stackoverflow and copypaste basic things multiple times. Even for example during live coding interview having livetemplates seems awesome, copypasting from stackoverflow would be shameful (I think). Using my own custom shortcuts for livetemplates seems the best way for how my brain functions (I suck at memorizing tiny details, but I remember general idea/flow of a pattern and I would prefer memorizing what to use and when to use, instead of all small details of implementation).
Is getting to dependent on livetemplates a good practice to get used to? Do other developers frown upon a dev who has dozens of livetemplates and relies on them instead of writing all code from memory by hand?
rant
question