|
|
Sure, but statistically speaking, aren't they insignificant?
I had an employer that tried that once, but most of the senior staff flat out refused to change because they already had consistent styles.
The problem wasn't really having a standard, but that the guy who chose it was less qualified to determine it than most of the people who had to use it.
Most other employers I've worked for simply don't have one.
Don't let my name fool you. That's my job.
|
|
|
|
|
You can't impose it on an existing team or an existing project. It has to be there from the start. The only time I worked at a place that had a style guide it had (probably) been in place since the 1970s. Among other things, it specified eighty characters per line max.
Naruki wrote: Most other employers I've worked for simply don't have one.
Without one, you get chaos. You might check a file out, apply your preferred formatting, and check it back in with nothing but formatting changes.
|
|
|
|
|
Standards like that are outdated IMHO and seemed only justified in the old telnet terminal/vi days.
|
|
|
|
|
ohmikkie wrote: telnet terminal/vi
Those days aren't completely gone (yet). I telnet into my AlphaServers... if only I could use C# on them.
|
|
|
|
|
Coding standards are good but in my experience, subject to continuous refinement. Software written to an old standard should be maintained in keeping with the way it was written. Unfortunately we don't always have the luxury of writing new code and I hate it when I need to modify code that written/edited in multiple styles.
|
|
|
|
|
Maybe Microsoft should do away with the idea of code being stored in "text" files and consider a xml style.
The advantages would be everyone can format code any which way they like and the actual code itself is just a big block of code.
And commenting would only be allowed in ONE style so it's not like // random /* occurances ********* of weird */ /// styles... Just have it all render as some graphical primitive, like a sticky-note colored rectangle with text?.
Other advantages would be "smart" code files... like they can preserve edit history much like a photoshop .psd file can.
Disadvantage is printing will be a area of concern... but not so much if printing of code is no longer practiced.
Another advantage is the ability to embed any type of document in-line with code as a advanced form of comment/information... like having PICTURES and PDF files and WEBPAGES as small resizable elements right their above the function that is based on their information.
If the future is 3D representation of files and code then Ms better jump on this right away :P
|
|
|
|
|
The yes category did not fit my reasoning either but the second was closer to the first.
John
|
|
|
|
|
Not every member of the team has the same monitor size as I do, so limiting the width makes no sense. There will always be colleagues that have bigger monitors than mine. And everybody upgrades the monitor once in a while.
And since I like to see the entire line of code, Word Wrap solves the issue. There is never code that is hidden on the right side, because of the horizontal scroll, so I never wonder why the application doesn't perform how I want it to.
|
|
|
|
|
True, but word wrap offends my sense of geometry and proportion. A line should be a line not a rectangle after all. I bought a 30" Dell Monitor to get over the problem, which is cool because not only can you fit a massive line of code on it, it also makes you feel like a God. Recommended to all.
Regards,
Rob Philpott.
|
|
|
|
|
Hope its a flat screen. Or if its a tube, they included free sunscreen.
|
|
|
|
|
And a small crane to pick it up on the desk.
|
|
|
|
|
Mihai Maerean wrote: Not every member of the team has the same monitor size
That's exactly why the team needs to set a limit.
|
|
|
|
|
If you don't flaunt your monitor size by extending the lines too long, how will you know your ePenis is bigger than theirs? You just don't seem to know a thing about programming.
Don't let my name fool you. That's my job.
|
|
|
|
|
What I lack in girth I make for in length.
|
|
|
|
|
Is that a 30" monitor in your pocket, or do you just buy really big, squared pants?
private void geekLove(char[] condom) {
if (condom == null || condom.length < 5) return;
int sex = 0;
do {
thrust();
Thread.sleep(1000);
sex++;
} while (sex < 10)
pay();
return;
}
Don't let my name fool you. That's my job.
|
|
|
|
|
Personally, I'd have used a for-loop rather than a do-while. A lot more conventional. Also, your return statement is redundant.
Regards,
Rob Philpott.
|
|
|
|
|
Initially it was a for loop, but that seemed too detached. A statement that says "do" seemed much more appropriate for the theme. Plus, it gives the impression that it may continue for a long time (until you see the conditional at the end), whereas a for loop spells out an exact number of steps up front. So I changed it.
At first I had the function set to int, so I needed a return statement. Then I thought void would better express the emotional investment of geekLove, as far as this context was concerned. The "return" then emphasized that, once the money was paid, it was time to leave.
And I grossly over-analyzed this when I wrote it. Did I mention that I'm a geek?
Don't let my name fool you. That's my job.
|
|
|
|
|
Naruki wrote: And I grossly over-analyzed this when I wrote it.
Well, you nailed the gross part...
-------------------------
Spiffdog Design
It's ok.. he's no ordinary dog...
|
|
|
|
|
Nah make it like a game loop
while(1)
{
...
} ///lol
|
|
|
|
|
I never thought about it like that!
|
|
|
|
|
You should write this up in javascript so it executes slower!
|
|
|
|
|
It is very useful to limit the length and width at a 16:9 ratio, so that it looks nice on modern TV sets.
|
|
|
|
|
You mean when it winds up on the evening news for crashing an airliner or something?
|
|
|
|
|
Technically, this sentence have no sense at all.
'Cause, this is aspect ratio, and it can be anything given the same width.
...Unless you try to fit your code on exactly one screen. But this is really unpractical to break your code so that every part would fit on one page.
|
|
|
|