Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

So Angry (Programming Semantics)

Jsecure Hanks
Capitalist
Join date: 9 Dec 2003
Posts: 1,451
05-11-2005 09:37
Ugh I'm fresh out of uni at this company where I work with this guy, who has no degree. He's stuck here cause nobody else will employ him, so he tries to take it out on me. Here's what makes me mad.

Tabs vs. Spaces

When I got here I indented everything with tabs. Nuff said.

The guy said, Nooo, my tab width is different, this is coming out wrong. So I changed to space based indenting. Beautiful. Looks the same in every bit of software, everywhere. The end. Not.

He says Noooo, uh, Nooooo (no reason given). He says he's written his own coding standards everyone else has to stick to (Note, NOT my manager, just my equal in a room where I have a separate manager who manages both of us), so I have to use tabs...

Now hold the phone, I started off using tabs, why was that wrong....

Here we are, he wants me (wait for it) to use tabs to indent lines, then spaces to line up equals signs in variables. So for some of them this means sitting there and typing out space after space by hand. For god's sake!!

Is it too much to ask that I just use tabs OR spaces, but not zenlike combinations of the two that are designed to make me need to put in spaces by hand? Cause I don't want to put in tabs. Or spaces. I wanna code something!

(Yes this guy is ALWAYS going on about tiny little cosmetic details)
Zonax Delorean
Registered User
Join date: 5 Jun 2004
Posts: 767
05-11-2005 09:49
It's easy!

Use TABs for INDENTING.
SPACES for ALIGNING.

Tab size independent formatting
Jsecure Hanks
Capitalist
Join date: 9 Dec 2003
Posts: 1,451
05-11-2005 09:52
How are you supposed to get something like VI to support that constant changing of heart? I don't want 'coding' to become "space-space-space-space-space-space-space-space".

You can set VI to do a hard tab on press of the tab key. Or spaces. But not both in certain times and if there is a full moon. Gee I remember when code was about producing some machine instructions that did something :(
Paolo Portocarrero
Puritanical Hedonist
Join date: 28 Apr 2004
Posts: 2,393
05-11-2005 10:57
From: Jsecure Hanks
How are you supposed to get something like VI to support that constant changing of heart? I don't want 'coding' to become "space-space-space-space-space-space-space-space".

You can set VI to do a hard tab on press of the tab key. Or spaces. But not both in certain times and if there is a full moon. Gee I remember when code was about producing some machine instructions that did something :(


What a bunch of hooey. Of all the "standards" to obsess about, tabs vs spaces is the least of my concerns as a developer...
_____________________
Facades by Paolo - Photo-Realistic Skins for Doods
> Flagship store, Santo Paolo's Lofts & Boutiques
> SLBoutique
Ghoti Nyak
καλλιστι
Join date: 7 Aug 2004
Posts: 2,078
05-11-2005 11:02
Me, I'd take out the spaces and the tabs and totally make up my own coding standards, and see if I could give this guy an aneurysm or something.

-Ghoti
_____________________
"Sometimes I believe that this less material life is our truer life, and that our vain presence on the terraqueous globe is itself the secondary or merely virtual phenomenon." ~ H.P. Lovecraft
Rose Karuna
Lizard Doctor
Join date: 5 Jun 2004
Posts: 3,772
05-11-2005 11:16
From: Ghoti Nyak
Me, I'd take out the spaces and the tabs and totally make up my own coding standards, and see if I could give this guy an aneurysm or something.

-Ghoti


I'd log in as him and "re-arrange" all of his code using indents, tabs and spaces in completely random and creative ways. :D


.
_____________________
I Do Whatever My Rice Krispies Tell Me To :D
Arcadia Codesmith
Not a guest
Join date: 8 Dec 2004
Posts: 766
05-11-2005 11:21
Coding standards are a good thing, and you never appreciate how good until you're tasked with unravelling the spaghetti of somebody who doesn't agree.

Going overboard with standards is a bad thing. It hurts productivity and makes your coders grind their teeth too much.

Being unemployable as a coder just because you don't have a stupid piece of paper is a very bad thing. Been there, done that, sucks hard.
Jsecure Hanks
Capitalist
Join date: 9 Dec 2003
Posts: 1,451
05-11-2005 11:36
From: Rose Karuna
I'd log in as him and "re-arrange" all of his code using indents, tabs and spaces in completely random and creative ways. :D


.


Amen to you and Ghoti and Paolo :D

The guy is a really bad people person. I've never felt as stupid as since I took this job, he is really good at looking down at you, and talking to you like you're a baby. The other coder working there agrees with me. The problem is it's just me and the other fine coder, him, and the manager who is busy managing. So pretty much he acts like he runs the place cause he's been there 18 months and me only 6. And look what he's correcting me on. Tabs and spaces. Paolo is right, let's fuss about something that matters :D

I'm not saying coding standards don't matter, but let's face it: if you do stick to either tabs OR spaces in a piece of code, it will look neat and well laid out. And if you use spaces, it'll even look right in all the software in the world. Result. Now get back to doing something useful :D
Flyingroc Chung
:)
Join date: 3 Jun 2004
Posts: 329
05-11-2005 11:46
Get a good pretty printer and require everone to run their code through the pretty printer before checking the code in cvs or your favorite sorce code version control system. Then everyone can code in whatever combination of tabs and spaces they want, and still ahve the code come out consistent.

You can even have your favorite co-worker tweak the config file to reflect his favorite tabbing style.
Chandra Page
Build! Code. Sleep?
Join date: 7 Oct 2004
Posts: 360
05-11-2005 13:45
From: Ghoti Nyak
Me, I'd take out the spaces and the tabs and totally make up my own coding standards, and see if I could give this guy an aneurysm or something.


Yeah, run a global search and replace: all tabs and spaces become newlines.

Stick that in your compiler and smoke it!
_____________________
Come visit the In Effect main store and café
Drawbridge (160, 81)
Particle effects, fashion, accessories, and coffee!
On the Web at SL Exchange and SL Boutique
Icon Serpentine
punk in drublic
Join date: 13 Nov 2003
Posts: 858
05-11-2005 18:56
From: Arcadia Codesmith
Coding standards are a good thing, and you never appreciate how good until you're tasked with unravelling the spaghetti of somebody who doesn't agree.

Going overboard with standards is a bad thing. It hurts productivity and makes your coders grind their teeth too much.

Being unemployable as a coder just because you don't have a stupid piece of paper is a very bad thing. Been there, done that, sucks hard.


I like coding standards.. most of all, documentation. Makes for a slower start, but it saves money in the end.

And I just got hired as a hack coder. Never went to school for it and now I'm unravelling other peoples' messy and obtuse code.

I'm not even going to get into the school thing -- long story short, I spend more time aggravated by beauracracy and teachers who focus on grades rather than learning.
_____________________
If you are awesome!
Garoad Kuroda
Prophet of Muppetry
Join date: 5 Sep 2003
Posts: 2,989
05-11-2005 21:50
WTF? That's anal!

Tell that anal crevice to shut the @#$% up!

Ok maybe not good advice.

Um, but it's still anal. One of the points of coding standards is to increase productivity--this does anything but that because everyone has their own style. It's like a religion to a degree. Tell him to get stuffed! No wait that's bad advice too...

I DO understand where he's coming from, absolutely. But if two people insist on using different tab sizes, you have to either convert to spaces or decide on a damn tab size.
_____________________
BTW

WTF is C3PO supposed to be USEFUL for anyway, besides whining? Stupid piece of scrap metal would be more useful recycled as a toaster. But even that would suck, because who would want to listen to a whining wussy toaster? Is he gold plated? If that's the case he should just be melted down into gold ingots. Help the economy some, and stop being so damn useless you stupid bucket of bolts! R2 is 1,000 times more useful than your tin man ass, and he's shaped like a salt and pepper shaker FFS!
Adam Zaius
Deus
Join date: 9 Jan 2004
Posts: 1,483
05-11-2005 21:56
If you have access to a decent IDE, KDevelop(Gideon) or MSVC, they can all do 'reformat source'. I prefer KDevelop's method of this since (as being open source) it has so many configuration options for the autoformat that you can get almost any style you demand.

This means you dont need to spend 25 minutes reformatting your code to match the standard-of-the-week, and can write it how you choose, then reformat it to whatever is required.

-Adam
_____________________
Co-Founder / Lead Developer
GigasSecondServer
Siggy Romulus
DILLIGAF
Join date: 22 Sep 2003
Posts: 5,711
05-11-2005 21:58
From: Rose Karuna
I'd log in as him and "re-arrange" all of his code using indents, tabs and spaces in completely random and creative ways. :D
.


I had a problem child like this once too - since whitespace doesn't matter in languages like C, I logged in as him and turned an entire page of code into a sign saying 'GO F*CK YOURSELF'.

Best hour of non-paid OT I ever invested.

a secondary method is to make variables with interesting names like my_coworker_sucks_arse

which becomes lots of fun because your code tells you a little story later on in the process :)

Siggy.

(Who doesn't work in IT anymore because it sucks great big hairy dogballs)
_____________________
The Second Life forums are living proof as to why it's illegal for people to have sex with farm animals.

From: Jesse Linden
I, for one, am highly un-helped by this thread
Garoad Kuroda
Prophet of Muppetry
Join date: 5 Sep 2003
Posts: 2,989
05-11-2005 22:52
Hey, there you go, use a better IDE that can reformat. What's that? VI can't do that? :D

neener neener!

Siggy: ROFLMAO
_____________________
BTW

WTF is C3PO supposed to be USEFUL for anyway, besides whining? Stupid piece of scrap metal would be more useful recycled as a toaster. But even that would suck, because who would want to listen to a whining wussy toaster? Is he gold plated? If that's the case he should just be melted down into gold ingots. Help the economy some, and stop being so damn useless you stupid bucket of bolts! R2 is 1,000 times more useful than your tin man ass, and he's shaped like a salt and pepper shaker FFS!