Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««123

FOR XML PATH Expand / Collapse
Author
Message
Posted Thursday, February 25, 2010 11:38 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 5:50 PM
Points: 7,923, Visits: 9,649
paul.goldstraw (2/25/2010)
I would say fixed width makes it easier to indent your code since every character fits in a same size block. For me, that's the only reason, it's mere personal preference beyond that. Not sure if others have other reasons why?

I'm not sure there are any fixed width fonts that let me use even a full range of eurpean latin-based alphabets, let alone Cyrillic and Arabic too, and certainly not Japanese, Chinese, Korean and various Indian alphabets. Since I have worked mostly in a fairly international environments, and want to work usually in Unicode, this tends to force me onto variable width fonts. Of course it then makes sense to use fixed width (measured in inches or metres or whatever) tabs, rather than letting tabs represent a number of characters from the margin.


Tom
Post #872915
Posted Friday, February 26, 2010 2:15 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Friday, May 9, 2014 12:47 AM
Points: 3,448, Visits: 4,407
bc_ (2/25/2010)
is there an advantage to using a fixed width font? or is it personal preference?

Fixed-width fonts allow to adjust and beautify a piece of code easily.

Simple example (Courier New):
CREATE TABLE #TEST_TABLE
( Id INT NOT NULL IDENTITY,
Customer_Id INT NOT NULL,
Customer_Name VARCHAR(100) NOT NULL,
Invoice_Id INT NULL,
Invoice_Total MONEY NULL,
Invoice_Tax MONEY NULL,
Discount_Percent NUMERIC(5,2) NULL
)

With Arial Black, this code will look like:
CREATE TABLE #TEST_TABLE
( Id INT NOT NULL IDENTITY,
Customer_Id INT NOT NULL,
Customer_Name VARCHAR(100) NOT NULL,
Invoice_Id INT NULL,
Invoice_Total MONEY NULL,
Invoice_Tax MONEY NULL,
Discount_Percent NUMERIC(5,2) NULL
)

Alignment is not as good as before, and (it's more important) another developer will see a total mess when he/she opens the code in his/her SSMS. I think the developer will not be happy

Delphi, Clarion, Visual Studio, Query Analyzer, SSMS, PL/SQL Developer - all of these use fixed-width fonts by default...
Post #873260
Posted Monday, March 22, 2010 3:02 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Thursday, March 27, 2014 8:16 AM
Points: 534, Visits: 282
Fatal Exception Error (2/23/2010)
Good Question

I got it right but for the wrong reason's(process of elimination) in my opinion.

I must say I am not a fan of the image since I could not copy the SQL and format it(not run it) to my liking.

Don't see why you'd consider that the wrong reason - worked just as well for me.

To (badly?) quote Sherlock Holmes (or Sir A. C. Doyle if you prefer)
"Once you have elimiated the impossible, then whatever is left, however improbable, must be the answer"...


Kelsey Thornton
MBCS CITP
Post #887216
Posted Monday, March 22, 2010 3:13 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Thursday, March 27, 2014 8:16 AM
Points: 534, Visits: 282
Tom.Thomson (2/25/2010)
paul.goldstraw (2/25/2010)
I would say fixed width makes it easier to indent your code since every character fits in a same size block. For me, that's the only reason, it's mere personal preference beyond that. Not sure if others have other reasons why?

I'm not sure there are any fixed width fonts that let me use even a full range of eurpean latin-based alphabets, let alone Cyrillic and Arabic too, and certainly not Japanese, Chinese, Korean and various Indian alphabets. Since I have worked mostly in a fairly international environments, and want to work usually in Unicode, this tends to force me onto variable width fonts. Of course it then makes sense to use fixed width (measured in inches or metres or whatever) tabs, rather than letting tabs represent a number of characters from the margin.


I always use the "so-called"(?) fixed-width fonts in code and eschew tabs like the plague.
The latter is a klingon from an ancient Fortran compiler which would crash if it saw a tab anywhere EXCEPT as the very first character on a line. I still hate tabs in code as my colleagues will no doubt attest.
The only place where I use tabs is in word-processed documentation (where it *is* better).


Kelsey Thornton
MBCS CITP
Post #887219
Posted Tuesday, March 30, 2010 8:38 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Today @ 12:47 AM
Points: 9,928, Visits: 11,205
The poor UNION statement, abused again



Paul White
SQL Server MVP
SQLblog.com
@SQL_Kiwi
Post #892849
« Prev Topic | Next Topic »

Add to briefcase «««123

Permissions Expand / Collapse