Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 04-07-2010, 10:52 AM   #1
Altwebdesign
Guest
 
Posts: n/a
When you hire a coder/programmer

If you are hiring a programmer on a freelance/contract basis do you expect to have all code eg css php sql queries commented?
Comments enable you or another coder to understand what a specific block of code does.
How many of you expect this as standard or how many of you would pay a little extra for the time taken (and saved in the future) to do this?
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2010, 10:53 AM   #2
BestXXXPorn
Confirmed User
 
BestXXXPorn's Avatar
 
Join Date: Jun 2009
Location: Asheville, NC
Posts: 2,277
100% YES on comments being included... and I'm a developer.
__________________
ICQ: 258-202-811 | Email: eric{at}bestxxxporn.com
BestXXXPorn is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2010, 10:55 AM   #3
Barefootsies
Choice is an Illusion
 
Barefootsies's Avatar
 
Industry Role:
Join Date: Feb 2005
Location: Land of Obama
Posts: 42,635
:2cents

Quote:
Originally Posted by BestXXXPorn View Post
100% YES on comments being included... and I'm a developer.
__________________
Should You Email Your Members?

Link1 | Link2 | Link3

Enough Said.

"Would you rather live like a king for a year or like a prince forever?"
Barefootsies is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2010, 10:56 AM   #4
BestXXXPorn
Confirmed User
 
BestXXXPorn's Avatar
 
Join Date: Jun 2009
Location: Asheville, NC
Posts: 2,277
I should add:

PHP code (or other scripting languages) should have every file, function, and method commented as well as blocks of code and complex conditionals...

CSS should be self commenting (i.e. good class names) Although I like to separate out blocks of CSS with comments so it makes it a bit easier to find the "area" you're looking for. I generally separate out the CSS classes by what page they are used on with general (site wide) classes having their own group.

I don't comment queries unless they are very complex... they should be self explanatory.
__________________
ICQ: 258-202-811 | Email: eric{at}bestxxxporn.com

Last edited by BestXXXPorn; 04-07-2010 at 10:57 AM..
BestXXXPorn is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2010, 10:58 AM   #5
Varius
Confirmed User
 
Industry Role:
Join Date: Jun 2004
Location: New York, NY
Posts: 6,890
If you are hiring freelancers/outsourcers, you should not expect/assume anything.

You should make sure it's included in your specifications that all code must be properly commented/documented.
__________________
Skype variuscr - Email varius AT gmail
Varius is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2010, 10:58 AM   #6
Altwebdesign
Guest
 
Posts: n/a
Cheers for that. Was just curious as to what other coders do or what those who hire expect.
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2010, 10:58 AM   #7
grumpy
Too lazy to set a custom title
 
grumpy's Avatar
 
Join Date: Jan 2002
Location: Holland
Posts: 9,870
just one line in head of function and a few notes down the way
__________________
Don't let greediness blur your vision | You gotta let some shit slide
icq - 441-456-888
grumpy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2010, 11:07 AM   #9
EZRhino
Confirmed User
 
EZRhino's Avatar
 
Industry Role:
Join Date: Jul 2003
Location: couch
Posts: 6,258
Great thread, for all those reading this and dont know, good commenting is worth the extra bucks. Will save a lot of headaches in the future.
EZRhino is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2010, 11:19 AM   #10
mafia_man
Confirmed User
 
mafia_man's Avatar
 
Industry Role:
Join Date: Jul 2005
Location: icq#: 639544261
Posts: 1,965
Quote:
Originally Posted by BestXXXPorn View Post
I should add:

PHP code (or other scripting languages) should have every file, function, and method commented as well as blocks of code and complex conditionals...

CSS should be self commenting (i.e. good class names) Although I like to separate out blocks of CSS with comments so it makes it a bit easier to find the "area" you're looking for. I generally separate out the CSS classes by what page they are used on with general (site wide) classes having their own group.

I don't comment queries unless they are very complex... they should be self explanatory.
Yes functions and methods.

Did I repeat myself?
__________________
I'm out.
mafia_man is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2010, 11:19 AM   #11
KillerK
Confirmed User
 
Join Date: May 2008
Posts: 3,406
Quote:
Originally Posted by Varius View Post
If you are hiring freelancers/outsourcers, you should not expect/assume anything.

You should make sure it's included in your specifications that all code must be properly commented/documented.
Varius FTW!!!
KillerK is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2010, 11:23 AM   #12
camperjohn64
Confirmed User
 
Industry Role:
Join Date: Feb 2005
Location: Los Angeles
Posts: 1,531
// Talk about how commenting is useful
I am a comment fanatic, and it has payed off when I look at code 4 years later and can understand it and modify it within minutes.

// Say something insightful tying life and code together
People comment their code like they comment their life - they either plan it as they go, or fuck it up without documentation and hope to fix it later.
__________________
www.gimmiegirlproductions.com

Last edited by camperjohn64; 04-07-2010 at 11:25 AM..
camperjohn64 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2010, 11:27 AM   #13
k0nr4d
Confirmed User
 
k0nr4d's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,228
Im not gonna say im against commenting because its sometimes useful when something is done complicated or strange for some specific reason, but the fact is if someone cant figure out what a piece of code does from looking at it, they have no business editing it.

As long as you use self-explainatory function names and variables...
k0nr4d is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2010, 11:31 AM   #14
mafia_man
Confirmed User
 
mafia_man's Avatar
 
Industry Role:
Join Date: Jul 2005
Location: icq#: 639544261
Posts: 1,965
Quote:
Originally Posted by k0nr4d View Post
Im not gonna say im against commenting because its sometimes useful when something is done complicated or strange for some specific reason, but the fact is if someone cant figure out what a piece of code does from looking at it, they have no business editing it.

As long as you use self-explainatory function names and variables...
If you don't comment then you should document code. One or the other depending on how big the project is.

If it's some shitty PHP script to resize pics though I wouldn't bother. Also Python because the code reads like a book anyway.
__________________
I'm out.
mafia_man is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2010, 11:56 AM   #15
BestXXXPorn
Confirmed User
 
BestXXXPorn's Avatar
 
Join Date: Jun 2009
Location: Asheville, NC
Posts: 2,277
Quote:
Originally Posted by k0nr4d View Post
Im not gonna say im against commenting because its sometimes useful when something is done complicated or strange for some specific reason, but the fact is if someone cant figure out what a piece of code does from looking at it, they have no business editing it.

As long as you use self-explainatory function names and variables...
Just because something may seem logical to you and the flow of information is something you architected... it doesn't necessarily mean it's going to be logical to someone else...

The next guy that comes along may normally follow a completely different design paradigm or maybe they're just inexperienced...

Good commenting practices make code (however clean it may be) easier for everyone that follows after you.
__________________
ICQ: 258-202-811 | Email: eric{at}bestxxxporn.com
BestXXXPorn is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2010, 11:59 AM   #16
grumpy
Too lazy to set a custom title
 
grumpy's Avatar
 
Join Date: Jan 2002
Location: Holland
Posts: 9,870
Quote:
Originally Posted by k0nr4d View Post
Im not gonna say im against commenting because its sometimes useful when something is done complicated or strange for some specific reason, but the fact is if someone cant figure out what a piece of code does from looking at it, they have no business editing it.

As long as you use self-explainatory function names and variables...
well said sir, hats off
__________________
Don't let greediness blur your vision | You gotta let some shit slide
icq - 441-456-888
grumpy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2010, 12:04 PM   #17
Serge Litehead
Confirmed User
 
Serge Litehead's Avatar
 
Industry Role:
Join Date: Dec 2002
Location: Behind the scenes
Posts: 5,190
the truth is
if you expect full documentation, add 30-100% to the cost of project. any respected developer will not put in time into documentation without being compensated for the time it takes document the code on tight budget projects. since most people demand usually functionality and fast results.

its good practice to comment things
but unless documenting included in quote don't expect it by default.
__________________
Serge Litehead is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2010, 12:19 PM   #18
Broda
Confirmed User
 
Join Date: Feb 2003
Location: CheapAssDesigns.com
Posts: 1,874
Quote:
Originally Posted by holograph View Post
the truth is
if you expect full documentation, add 30-100% to the cost of project. any respected developer will not put in time into documentation without being compensated for the time it takes document the code on tight budget projects. since most people demand usually functionality and fast results.

its good practice to comment things
but unless documenting included in quote don't expect it by default.
Exactly my words.
__________________
CheapAssDesigns.com - when you need quality designs at affordable prices.
icq: 230-729-205
info |at| cheap ass designs dot com
Broda is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2010, 12:23 PM   #19
woj
<&(©¿©)&>
 
woj's Avatar
 
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
Quote:
Originally Posted by holograph View Post
the truth is
if you expect full documentation, add 30-100% to the cost of project. any respected developer will not put in time into documentation without being compensated for the time it takes document the code on tight budget projects. since most people demand usually functionality and fast results.

its good practice to comment things
but unless documenting included in quote don't expect it by default.
</thread>
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager
woj is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2010, 12:30 PM   #20
Killswitch - BANNED FOR LIFE
Guest
 
Posts: n/a
Quote:
Originally Posted by Varius View Post
If you are hiring freelancers/outsourcers, you should not expect/assume anything.

You should make sure it's included in your specifications that all code must be properly commented/documented.
Quote:
Originally Posted by k0nr4d View Post
Im not gonna say im against commenting because its sometimes useful when something is done complicated or strange for some specific reason, but the fact is if someone cant figure out what a piece of code does from looking at it, they have no business editing it.

As long as you use self-explainatory function names and variables...
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2010, 12:32 PM   #21
BestXXXPorn
Confirmed User
 
BestXXXPorn's Avatar
 
Join Date: Jun 2009
Location: Asheville, NC
Posts: 2,277
Quote:
Originally Posted by holograph View Post
the truth is
if you expect full documentation, add 30-100% to the cost of project. any respected developer will not put in time into documentation without being compensated for the time it takes document the code on tight budget projects. since most people demand usually functionality and fast results.

its good practice to comment things
but unless documenting included in quote don't expect it by default.
Full documentation? Who does that? Full documentation is different than well commented code... OP asked about commenting... not documentation.

I factor my code commenting time in with EVERYTHING I do... Nothing leaves my local dev environment without being well commented.

30% - 100% time? Try more like 10%... if that. (If you're talking about commenting)
__________________
ICQ: 258-202-811 | Email: eric{at}bestxxxporn.com

Last edited by BestXXXPorn; 04-07-2010 at 12:34 PM..
BestXXXPorn is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2010, 01:11 PM   #22
Altwebdesign
Guest
 
Posts: n/a
Kool feedback guys. Thanks for this!!
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2010, 01:50 PM   #23
Serge Litehead
Confirmed User
 
Serge Litehead's Avatar
 
Industry Role:
Join Date: Dec 2002
Location: Behind the scenes
Posts: 5,190
Quote:
Originally Posted by BestXXXPorn View Post
Full documentation? Who does that? Full documentation is different than well commented code... OP asked about commenting... not documentation.

I factor my code commenting time in with EVERYTHING I do... Nothing leaves my local dev environment without being well commented.

30% - 100% time? Try more like 10%... if that. (If you're talking about commenting)
you have a point, basic commenting shouldn't affect cost much as well not much should be expected. My train of thought went on to larger scale somehow
__________________
Serge Litehead is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2010, 02:07 PM   #24
BestXXXPorn
Confirmed User
 
BestXXXPorn's Avatar
 
Join Date: Jun 2009
Location: Asheville, NC
Posts: 2,277
Quote:
Originally Posted by holograph View Post
you have a point, basic commenting shouldn't affect cost much as well not much should be expected. My train of thought went on to larger scale somehow
Then I definitely agree with your 30% - 100% time addition... full documentation is a pain in the ASS and takes forEVER... and it's outdated as soon as there's an addition unless you always keep it up to date... that's a REALLY rare case.
__________________
ICQ: 258-202-811 | Email: eric{at}bestxxxporn.com
BestXXXPorn is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2010, 02:08 PM   #25
cyber
Confirmed User
 
cyber's Avatar
 
Industry Role:
Join Date: Jan 2004
Posts: 182
Code:
function a($input){
// please to be doing the needful
  ....
  ....
}
cyber is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2010, 02:52 PM   #26
Varius
Confirmed User
 
Industry Role:
Join Date: Jun 2004
Location: New York, NY
Posts: 6,890
One more thing to note, when working with foreign programmers, you should normally ask them to comment their code in English, unless you only ever plan to hire developers of that same language.

I remember one particular project which I had to sort my way through plenty of code (CSS element names no less!) in Russian and Czech and it's not very fun (although I did learn some words)
__________________
Skype variuscr - Email varius AT gmail
Varius is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2010, 03:58 PM   #27
camperjohn64
Confirmed User
 
Industry Role:
Join Date: Feb 2005
Location: Los Angeles
Posts: 1,531
Quote:
Originally Posted by cyber View Post
Code:
function a($input){
// please to be doing the needful
  ....
  ....
}
HAHAHAAHAHAHAA, That is so true! Engrish or Indian coders sooo do this!
__________________
www.gimmiegirlproductions.com
camperjohn64 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-08-2010, 05:36 AM   #28
Altwebdesign
Guest
 
Posts: n/a
Quote:
Originally Posted by Varius View Post
One more thing to note, when working with foreign programmers, you should normally ask them to comment their code in English, unless you only ever plan to hire developers of that same language.

I remember one particular project which I had to sort my way through plenty of code (CSS element names no less!) in Russian and Czech and it's not very fun (although I did learn some words)
good point i didnt even consider that people would comment in their native instead of english.

i guess the main key points are:
reccomend commenting to your client
dont let your client assume you do commenting
add the cost onto your fee, which is probably less than 10-15%
comment in english, not russian :P
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-08-2010, 06:28 AM   #29
EscortBiz
Fuck Checks, CASH only!
 
Join Date: May 2002
Location: New York City
Posts: 19,422
Quote:
Originally Posted by BestXXXPorn View Post
Then I definitely agree with your 30% - 100% time addition... full documentation is a pain in the ASS and takes forEVER... and it's outdated as soon as there's an addition unless you always keep it up to date... that's a REALLY rare case.
i cant think of any project I did that needed full doc, basic comments a few words will do just fine, and only where the fuctions are not obvious
EscortBiz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-08-2010, 06:47 AM   #30
k0nr4d
Confirmed User
 
k0nr4d's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,228
Quote:
Originally Posted by EscortBiz View Post
i cant think of any project I did that needed full doc, basic comments a few words will do just fine, and only where the fuctions are not obvious
Exactly. Full documentation is if you are writing up an API for other coders to work with, not for explaining what a function called "getTomorrowsDate()" or something obvious.
k0nr4d is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-08-2010, 07:30 AM   #31
cyco_cc
Confirmed User
 
cyco_cc's Avatar
 
Join Date: Oct 2008
Posts: 344
Quote:
Originally Posted by k0nr4d View Post
Im not gonna say im against commenting because its sometimes useful when something is done complicated or strange for some specific reason, but the fact is if someone cant figure out what a piece of code does from looking at it, they have no business editing it.

As long as you use self-explainatory function names and variables...
That's missing the whole point of commenting. Commenting is for the "why" not the "what". Take for example:

int x = 5; // Declare a new int and set it to 5.

The above is useless because you know what the line does. However:

int x = 5; // This is our initial case as our function is not defined for x < 5.


Is not useless because it might not be readily apparent that said function isn't defined for values < 5. This is a simple example and yeah, in production code there would probably be a line in the method like if (x < 5) throw new InvalidArgumentException(x); so one could infer the restriction on the input, but it should definitely be commented.

This is especially useful in the case of financial or technical software (what I develop).
cyco_cc is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-08-2010, 11:26 AM   #32
Sid70
Downshifter
 
Sid70's Avatar
 
Industry Role:
Join Date: Dec 2002
Location: Road trip
Posts: 16,413
Quote:
Originally Posted by holograph View Post
the truth is
if you expect full documentation, add 30-100% to the cost of project. any respected developer will not put in time into documentation without being compensated for the time it takes document the code on tight budget projects. since most people demand usually functionality and fast results.

its good practice to comment things
but unless documenting included in quote don't expect it by default.
Bookmarked!
__________________
Русня, идите нахуй!
Sid70 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.