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

I'm curious, I hear this alot, but when I'm coding, whenever I need to type out constants, they're in ALL-CAPS. Do you remap caps-lock to an unused spot, or do you hold down shift while typing? I'm usually in vim or equivalent most of the time, FWIW.



In vim, after typing `gravity_constant`, go to normal mode:

  vb~
There, the word is now in CAPS.


I have an Ergodox-ez keyboard and I have gotten rid of the caps lock key, at least on my 'first layer.'

My keyboard enables me to create up to 32 different layers. I have 3 that I use 99.98% of the time.

My caps lock is available by pressing a key next to my left handed thumb and then pressing the key formerly known as the caps lock key.


Yeah I use caps lock as esc, and shift type capitals


I hold down the shift (or Copy/Paste, ha ha).


What language do you type constants in all caps ?


I see it in Programmable Logic Controllers. Engineering drawings often come in all caps and a program's input and output buffers are sometimes named to match. The older programs were in all caps because the programming terminals had no lowercase.

https://www.artisantg.com/itemimages/AB_1747_PT1_View1.jpg


Pretty common in C-family languages (global constants tend to be all-capped in many style guides), and for environment variables as well.


Devops people have to type environment variables quite often which are almost always uppercase by convention.


I see it in Python.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: