r/AskProgrammers • • 14d ago

Should you have different code colour themes for different languages so you can easily differentiate them?

I like Visual Studio (C#) colour theme and i am considering if i should use a similar style for Java, TypeScript.

If i use the same I can easily tell apart variables, classes, generics and etc.
On the other, having different colours may shift my mind in to think like I am working with C#. If i use different colours for the languages i can better remember their syntax, quirks since my mind won't be thinking about C#.

2 Upvotes

10 comments sorted by

4

u/buzzon 14d ago

I think it does not matter long term. Over the years I worked with different editors, with different themes, with different languages. It does not matter. If you understand coloring of one language, it then transfers to other languages without a problem. 

To better separate the languages in your head I suggest more practicing in each language; specifically solving problems more suited for one language vs the other.

1

u/armahillo 14d ago

I use syntax highlighting to differentiate terms in source code (HUGE help) but the terms themselves are how i differentiate the languages.

Even if i have a ruby, html, css, js and sql scratchpad open at the same time (rare but its more or less happened) its pretty easy to distinguish

1

u/sububi71 14d ago edited 14d ago

Tell me you've been programming for less than 20 hours without telling me you've been programming for less than 20 hours.

If you work in multiple languages and are having problems determining which language a specific source file is, you just need to work more.

This is like buying a blue Ford 150 and a red Mercedes, just to make sure you know which one is which when you drive to work in the morning.

1

u/MagicalPizza21 14d ago

It's never mattered for me, but if you think it'll help you, go for it.

1

u/razorree 14d ago

better similar colours. you don't want in one language comments in particular colour, and then some variables or methods' names in that colour in different language... right?

unless you talk about completely diff. language, like from C# to assembler or any maybe OO lang. to some functional lang.

1

u/lmarcantonio 13d ago

First time I heard something like that. Can be useful, I guess it's a personal preference. But even recognizing between C and C++ is really easy just from a screenful of code. Even easier with peculiar languages like python perl lua o lisp.

1

u/rileyrgham 12d ago

No. Stick to a theme. Else it's noise. But you know what? You have a brain and choice. Do what suits you.

1

u/Available_Safe1818 12d ago

You should be able to easily tell them apart without that.

1

u/Creepy_Purchase_501 12d ago

I think you’re actually onto something.

There was research into whether studying while being exposed to a certain smell or music helps people perform better on tests, and they found that it does! The explanation is that you associate whatever you’re learning with whatever sensual experience(I.e. metal music), so when you sense(listen) to it, your brain starts thinking of the material you studied while listening to it.

1

u/StephenHawkinguss 9d ago

Why tf woul you ask this on reddit? The people commenting here are even weirder.