[ / / / / / / / / / / / / / ] [ dir / random / abcu / ebon / k / komica / miku / nofap / random / ytc ][Options][ watchlist ]

/tech/ - Technology

Freedom Isn't Free
You can now write text to your AI-generated image at https://aiproto.com It is currently free to use for Proto members.
Email
Comment *
File
Select/drop/paste files here
Password (Randomized for file and post deletion; you may also set your own.)
Archive
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Expand all images

File (hide): 409057ce9e90974⋯.jpg (26.13 KB, 474x376, 237:188, 123.jpg) (h) (u)

[–]

 No.1084495>>1084496 >>1084613 [Watch Thread][Show All Posts]

Every modern text editor comes with syntax highlighting function, it became essential feature for most programmers but how come there is no useful tutorials on how to efficiently navigate code with it? I mean almost every beginner language tutorial be it on the web or in the book comes with two colors: black on white or in reverse.

So, after I learned any coding language from a tutorial without syntax highlight and then opened modern text editor I got colorful rainbow puke and my eyes can't focus on text, only on colors.

This doesn't make any sense.

Not too long ago, I've read this infamous article: http://www.linusakesson.net/programming/syntaxhighlighting/index.php

While this was worked great for small files with less than 100 loc, navigating bigger files was harder and harder. So I compromised and added different colors for functions, statements and constants.

So this is where I am now, but I'm not sure that this is how it should work, I feel like that I'm missing something crucial and no one is going to tell me the secret of how syntax highlighting is really supposed to work. Help me /tech/, I'm pretty sure that it's much easier to navigate by different colors than no colors at all but I don't know exactly how to do it.

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

 No.1084496

>>1084495 (OP)

It's great because it helps me see when I fucked up closing some bracket or ending a string.

>While this was worked great for small files

It works great for large files too. That is until the highlighting becomes slow.

Then you should consider whether it really all needs to be in one file.

>I got colorful rainbow puke and my eyes can't focus on text, only on colors.

Is this supposed to be some cheap attempt at shilling your article? There is absolutely no problem at all.

>there is no useful tutorials on how to efficiently navigate code with it?

You navigate code by reading it.

>This doesn't make any sense.

Printing colour is expensive and highlighted code on the web

it has to be produced with some extra tool because the browser doesn't know anything about highlighting code.

However I found lots of tutorials on the internet with highlighted code.

>I mean almost every beginner language tutorial be it on the web or in the book comes with two colors: black on white or in reverse.

You must be on some other internet than me.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

 No.1084613

>>1084495 (OP)

anon, it is supposed to help you notice whether your code has the correct syntax or not. it can also help you if you can remember what colors indicate what, in the source code editor/text editor you are using. for example, does a statement within quotes become highlighted grey? if so, this gives you the indication whether everything that you wanted to be within those quotes is in the quotes or not, or if you accidentally put too many quotes, or if you accidentally ended the quote when you actually meant to place a quote within a quote (like, an escaped quote).

i will use python as an example:

print("Hello!")

in notepad++, the print function is purple. Hello! is grey AFTER you complete the quotations. the parentheses are blue UNTIL you complete them, which make them red (but when you do anything after putting the last parentheses, those parentheses become blue again.)

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.



[Return][Go to top][Catalog][Screencap][Nerve Center][Random][Update] ( Scroll to new posts) ( Auto) 5
2 replies | 0 images | Page ?
[Post a Reply]
[ / / / / / / / / / / / / / ] [ dir / random / abcu / ebon / k / komica / miku / nofap / random / ytc ][ watchlist ]