Post #31,390
3/8/02 3:51:00 PM
|
That's right, my time isn't worth anything
Two days working on a new app, and the boss tells me he doesn't like my naming convention: "tbl_ name" Besides the fact that this is useful for distinguishing tables from views, the big problem is that one of my tables is "tbl_group" and the queries are mostly dynamically built based on posted values. $table = 'tbl_'.$type; $title = ucfirst( $type ); $query = "SELECT * FROM $table"; I tried to just drop the "tbl_' prefix, but guess what? "group" is a SQL reserved word. So now I have to come up with some other less-descriptive name for the group table, then go through and put conditionals around everything that's based on it to turn titles etc. back into "group." And when I told him it would be a lot of work to make those changes throughout everything I've written, he said (ICQ, so this is verbatim): sorry, they're going to have to be renamed. i don't like the naming convention of having "tbl_" at the beginning of the table name, nor do i like having "_db" at the end of the database name.
it may be a lot of work, but you should've consulted someone prior to going forward with those names. i'm not going to be forced into non-standard naming conventions just because it would be a lot of work for someone. Oh, and this is a guy who didn't use SQL until about a year ago, so of course he's qualified to hold forth on proper naming conventions.
I can't be a Democrat because I like to spend the money I make. I can't be a Republican because I like to spend the money I make on drugs and whores.
|
Post #31,413
3/8/02 6:06:31 PM
|
What's the alternative?
i'm not going to be forced into non-standard naming conventions just because it would be a lot of work for someone.
What is the standard anyway? Does want Hungarian names???
Ray
|
Post #32,727
3/19/02 11:26:33 AM
|
Ah, yes. Force the weasel to define his terms.
Bat your baby blue eyes and tell him you'll be happy to comply, but first you need to know just which recognized standard you are to code to.
And do it in writing. Come up with an excuse to CC someone. And save a copy.
[link|http://www.angelfire.com/ca3/marlowe/index.html|http://www.angelfir...e/index.html] Truth is that which is the case. Accept no substitutes. If competence is considered "hubris" then may I and my country always be as "arrogant" as we can possibly manage.
|
Post #31,414
3/8/02 6:09:32 PM
|
So he likes spaghetti code, right?
I mean...prefacing a table name with tbl...and a database postfix of _db...oh dear GOD...whats next...COMMENTS IN YOUR CODE!?!?!?!
Get with the program dood.
You were born...and so you're free...so Happy Birthday! Laurie Anderson
[link|mailto:bepatient@aol.com|BePatient]
|
Post #31,423
3/8/02 7:21:35 PM
|
That program leads to job security. :)
No one else can easily figure out what you've done.
But if there is a company standard, there should be documetation for it. I would request it.
Alex
"People demand freedom of speech to make up for the freedom of thought which they avoid." -- Soren Aabye Kierkegaard (1813-1855)
|
Post #31,462
3/9/02 8:15:51 AM
|
Precedent:: FInd tons of sample code
that uses your (good!) naming convention.
So, is this just a power-play thing from some higher-up who's feeling a bit insignificant right now?
On and on and on and on, and on and on and on goes John.
|
Post #31,599
3/11/02 9:51:46 AM
|
Give these two men a prize
The current naming convention is ... umm, just don't use any kind of descriptive prefixes. Since we don't know what a view is here -- just as we didn't know the difference between a join and a left join until someone (ahem) pointed out in the docs why it was taking so long to run that query -- we can't conceive of any situation where prefixes would help clarify anything.
Besides, we do everything from the command line, and those extra four characters just constiture extra typing. And you should know how things are interrelated anyway.
I can't be a Democrat because I like to spend the money I make. I can't be a Republican because I like to spend the money I make on drugs and whores.
|
Post #31,474
3/9/02 12:02:55 PM
|
Do it their way
like I did, and just hope that the stress and depression doesn't get to you like it did to me.
I did it exactly the way they wanted it done. Only they decided to let me go. They had no idea of the time it took to do it their way, and the time it would have taken had I had done it my way. My way would have been a much shorter amount of time, and a much better design. But when managers want to take 100% control of your code, it takes longer, costs more money, and isn't as good a design.
"Will code Visual BASIC for cash."
|
Post #31,473
3/9/02 11:57:08 AM
|
Solition 6 CMSOPEN
This naming convention sees to fit managers, because most programmers cannot figure out the naming convention. A group of Accountants, Lawyers, and Managers must have came up with the [link|http://www.cmsopen.com|CMSOPEN] database. I say this because the whole darn database is located in one database definition and not several. So if you have like 15 terrabytes of information in that database, you might as well throw as much cache RAM as you can into your SQL Server. But on a positive note, their billing and accounting part works great.
Anyway they had table names like "hbm_persnl", "hbm_client", "tbm_matter", etc. I never knew what the three letter acronyms (TLA) stood for before the rest of the name, but I used them anyway.
But working with this database for over 4 years, taught me a lot of things that should not be done with a database.
"Will code Visual BASIC for cash."
|
Post #31,570
3/10/02 11:14:43 PM
|
abbreviate, dude, abbreviate
Group is a reserved word? Cackle use a "standard" abbreviation, something like "grp". :=)
Where each demon is slain, more hate is raised, yet hate unchecked also multiplies. - L. E. Modesitt
|
Post #31,574
3/10/02 11:20:43 PM
|
Group, Grope, Grape?
Use shorthand, make it so that people won't understand what it is unless they talk to you.
grp_td_hr_emprec
vw_gd_eng_cirtest
Way way back, about 8 or 9 years ago at a former employer that I liked, someone was using a DOS based database called Screwnut and Washbolt to keep track of screws and nuts and washers and bolts at the factories. I had the task of converting the database into Access. It was fun, as were the database table names.
"Will work for fair salary and benefits, seeking company with integrity."
|
Post #31,626
3/11/02 11:38:07 AM
|
Shame on you for mixing form and content that way anyway. ;)
Don't conditional* everything--shoulda had a subclassing scheme (or persistent lookup table) to begin with. Welcome to G\ufffddel's personal Hell.
* Hey, I made a new word!
--------------------------------- A stupid despot may constrain his slaves with iron chains; but a true politician binds them even more strongly by the chain of their own ideas;...despair and time eat away the bonds of iron and steel, but they are powerless against the habitual union of ideas, they can only tighten it still more; and on the soft fibres of the brain is founded the unshakable base of the soundest of Empires."
Jacques Servan, 1767
|
Post #31,631
3/11/02 11:50:41 AM
|
Actually considered that
What I was doing is farily low level access to the data. I considered putting the rules for another layer of abstraction into a table but it was way overkill. I can pass in one variable, and it is the name of the page and the name of the table whose info is being displayed.
Basically the page title is the table name, except that I wanted the page titles to be human friendly, and the table names to be programmer friendly. (Yes, I realize what I just said.)
I can't be a Democrat because I like to spend the money I make. I can't be a Republican because I like to spend the money I make on drugs and whores.
|
Post #31,650
3/11/02 1:23:35 PM
|
No, you just misused an already existing one. HTH! :-)
|
Post #31,655
3/11/02 1:31:47 PM
|
Isn't the labour market looking up, lately?
Tell him he's a fuckwit.
And that your way is the way real programmers do it.
Reiterate that -- tell him that, as apparently opposed to him, you know several of us.
And since he obviously isn't one, he should just let you do your job.
Ask him if he really thinks he's better at your job than you are.
When he says, "Yes", laugh hysterically.
Tell him again, what a fuckwit he is.
Then, after he's fired you, use him as a negative-reference: Ask your next prospective employer, "Are you anything like that guy? 'Cuz then I wouldn't want to work for you!"
HTH!
(OK, probably not... How about this then -- call the table "groop"?)
Christian R. Conrad Of course, who am I to point fingers? I'm in the "Information Technology" business, prima facia evidence that there's bats in the bell tower. -- [link|http://z.iwethey.org/forums/render/content/show?contentid=27764|Andrew Grygus]
|
Post #31,662
3/11/02 1:50:47 PM
|
What I ended up doing
Called it 'group_tbl' and did a special-case check for it. Turned out I had it well-enough modularized already that I only had to put the check in one place. (Yay me!)
Thing is, the guy is a c++ wizard, and the only one here who can work with the HP3000's. (Our main work right now, BTW, is to port everything off them and get rid of them.) He still thinks the right way to do efficient data access is flat files. And seems to believe if something is not how he already does it, it can't be right.
PS: Shhh, don't tell anyone (especially not my wife) but I'm already checking the classifieds again.
I can't be a Democrat because I like to spend the money I make. I can't be a Republican because I like to spend the money I make on drugs and whores.
|
Post #32,696
3/19/02 1:46:45 AM
|
depends what you really want
>> He still thinks the right way to do efficient data access is flat files. <<
Efficient for what, the machine or the human?
>> And seems to believe if something is not how he already does it, it can't be right. <<
You have to decide what is more important: money, or the right to tell someone they are wrong. I am afraid that they are probably mutually exclusive. Sometimes I want to say, "I will take a 10k/yr pay cut to gain the privaledge of telling you when you are stupid." Or negotiate frequency of stupidity notifications per K reduction.
I once had a boss who actually liked to hear my opinion on things (most of the time). Those are rare. Most want smiling Yes-men.
But, naming conventions are a personal thing. I have my own preferences, but would not make somebody rewrite a bunch of stuff before they knew the shop conventions. If it was so important to him, he should have said so up front.
I would probably want prefixes for views and stored procedures, but not for tables.
________________ oop.ismad.com
|