0

Frustrating doesn't even start to describe the experience that wanting to post a well formated snip of code is at times.
e.g
Example
Spent quite sometime aligning expressions and clicking the darn "preview bottom". When everything seems to look more or less what I wanted, I pressed "Submit" and what did I get?
Garbage!
Tabs from code are over-exaggerated, expressions are wrapped to the next line; defeating the purpose of clear formated code in first place. And what is it that the preview doesn't look like the final result?

6
Contributors
12
Replies
13
Views
9 Years
Discussion Span
Last Post by Aia
Featured Replies
  • 1
    Aia 1,977   9 Years Ago

    >In the example provided, Aia used tabs in the first snippet and spaces in the second snippet. Yes, I spent time trying to figure how the whole thing ticked. Still it was annoying that no matter how I try to "squish" the expressions it would wrap around into the next … Read More

  • 1
    ~s.o.s~ 2,560   9 Years Ago

    Just follow the golden rule of never using TABS in your source code along with following the 70/80 column limit by using good source code formatters and you should be good to go without having to rely on which algorithm is used to format/render your code. Read More

  • 2
    Dani 1,638   9 Years Ago

    [QUOTE=Aia;583179]Frustrating doesn't even start to describe the experience that wanting to post a well formated snip of code is at times. [B]e.g[/B] [URL="http://www.daniweb.com/forums/post583165-6.html"]Example[/URL] Spent quite sometime aligning expressions and clicking the darn "preview bottom". When everything seems to look more or less what I wanted, I pressed "Submit" and what … Read More

0

Use spaces instead of tabs, and this problem will pretty much go away. I know that's not a "real" solution, but it's a workaround until Dani admits that there's a problem. ;)

0

>but it's a workaround until Dani admits that there's a problem
I am hoping for more than admission, since it is more than just the tabs.

0

I know that's not a "real" solution, but it's a workaround until Dani admits that there's a problem.

i think the problem is that unix-like and windows systems handle tabs differently.

0

> Use spaces instead of tabs, and this problem will pretty much go away.

In the example provided, Aia used tabs in the first snippet and spaces in the second snippet.

It's unfair to say that I refuse to admit there's a problem. I know that the tabs are overexaggerated and am still investigating possible solutions (I'm not happy with the brute force method of converting tabs to spaces which only works 5% of the time).

Basically what happened is we used to have a font size for the code snippets that allowed for 80 characters per line. But then there were multiple complaints that the code was too small and way too hard to read, and so I enlarged the font size, and now 80 characters per line don't fit anymore. It's a give and take. The font was only enlarged by one size, so if I reduce it by one size again, we'll have the same complaints we had before.

1

>In the example provided, Aia used tabs in the first snippet and spaces in the second snippet.
Yes, I spent time trying to figure how the whole thing ticked. Still it was annoying that no matter how I try to "squish" the expressions it would wrap around into the next line. I suppose that's the most frustrating part.

I find ironic we spend a lot of energy transmitting the message to the new posters of how to properly tag their code and have proper spacing; and when I want to show a good example, I can't. As soon as I make an explanatory comment into it, or I indent once and the statement has more that two evaluations (&&,||), the whole format goes "down hill".

>It's unfair to say that I refuse to admit there's a problem.
Admitting or not admitting for me it is irrelevant. I always look forward to the solution of the problem. I have found it more productive.

1

Just follow the golden rule of never using TABS in your source code along with following the 70/80 column limit by using good source code formatters and you should be good to go without having to rely on which algorithm is used to format/render your code.

0

Just follow the golden rule of never using TABS in your source code along with following the 70/80 column limit by using good source code formatters and you should be good to go without having to rely on which algorithm is used to format/render your code.

Without wanting to contradict you ~s.o.s~. That's what you may think. However make it more like 62 positions maximum limit without TABS. At least this is the case.

0

My post was not meant to open up a whole new can of worms regarding the font size and the column limit currently used; the only point I wanted to make was that one of the way to do away with the frustrating experience when posting code was to use spaces instead of tabs and follow the ?? column limit Daniweb has.

2

Frustrating doesn't even start to describe the experience that wanting to post a well formated snip of code is at times.
e.g
Example
Spent quite sometime aligning expressions and clicking the darn "preview bottom". When everything seems to look more or less what I wanted, I pressed "Submit" and what did I get?
Garbage!
Tabs from code are over-exaggerated, expressions are wrapped to the next line; defeating the purpose of clear formated code in first place. And what is it that the preview doesn't look like the final result?

Code now appears the same way when being previewed as in the actual post. Also, code blocks now support 80 characters per line.

Votes + Comments
Oh, Thou magnanimous one.
0

Code now appears the same way when being previewed as in the actual post. Also, code blocks now support 80 characters per line.

Hail to the Queen!!!! :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.