Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Old 01-09-2011, 04:52 PM Good Code
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0

http://xkcd.com/844/

I was just thinking the other day, the more time I spend trying to design something that is intuitive, easy to manage, and simple to update the less likely it is I'll ever actually finish.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
 
Register now for full access!
Old 01-09-2011, 05:22 PM Re: Good Code
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
OMG! This is funny as hell. I'm 3.5 months behind on a project the client told me that it was more important to do right than to do fast... Programming is an art, though, and if one doesn't make the call at some point, we'll always be doing touchups. :sigh:

Oh, well, I guess I better get back to the code! Thanks for the interlude of laughter.
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 01-10-2011, 01:35 AM Re: Good Code
Lashtal's Avatar
wherenomanhasgonebefore

Posts: 680
Name: Lashtal
Trades: 0
always takes a ton of time learning how something works, how to develop or write something yourself.

doesn't take too much time piecing things together.


Luckily, we can save our code snippets and create a portfolio "for later" to come back to. Copy, Paste. Copy, Paste. Copy, Paste. Copy, Paste.
__________________
Currently Reading:
Please login or register to view this content. Registration is FREE
Lashtal is offline
Reply With Quote
View Public Profile
 
Old 01-10-2011, 08:11 AM Re: Good Code
Super Talker

Posts: 101
Name: Hanmore Jemimah the Fourth
Location: the front line
Trades: 0
Quote:
Originally Posted by Lashtal View Post
always takes a ton of time learning how something works, how to develop or write something yourself.

doesn't take too much time piecing things together.


Luckily, we can save our code snippets and create a portfolio "for later" to come back to. Copy, Paste. Copy, Paste. Copy, Paste. Copy, Paste.
No No Lashy boy. The secret to good maverick knowledge (which is what you seek, clearly) (that's why, Chris, I feel that he actually WANTS to learn something hard like perl, he's "bored" of php I think, true PHP is good if you have to put it out fast on production lines in contained environments, but he wants to build fun software to while away the (speaking from my own experience now) schizo evenings) is this...

write the commands yourself, always - never be using...

1. TEMPLATES/libraries/modules
2. COPY-PASTED/downloaded readymade code*
3. Scripts/code you don't even look at once for any valid reason, it's just "included" without your having any knowledge of it.


*if you download it, look inside, throw away 80% of it or more and use the bits you want, having added more of your own code than the remaining existing code, that counts too as okay, otherwise no, it is the building of skyscrapers in deserts.


Let me try and make it clearer: when you are writing scripts off a commandline, creating text files, writing out the perl (or php, etc) header from the top of your head because you know it so well, when every package module you include is actually one you wrote yourself, completely bespoke, that will happen because you were writing every bit of code yourself at the outset.

Copying and pasting is putting off actually learning, forever. It's the same in all fields, research, marketing, etc. But to code as you want to code you should build something serious for yourself which forces you to learn to code it all yourself. Make a little search engine or something. Or a customizeable online shop front facility. Something slightly complex. Make a model bank account website, for storing and handling bank account information... but not real information, just a model (and thus work out what all the OTHER stuff you need to learn is, eg about security and where and how that would have to be implemented).

This is why C++ etc are bad, because you'll spend 800 years writing a program to calculate how far scotland is from your elbow and spend no time learning the multitude of ideas which EVERY programmer must sooner or later master or die... to use a word common to just about every programming language under the Solaris (just my pun, oh what fun, it is to have a name which means the sun). ie die - is a common exit commnand in cases of processing failure.

Here's some key things...


efficiency
- eg are you using structures which are too 'basic' or are you multitasking within the process, so that where you can you use a single sub-process as a model through which as many processes beneath that get their own structure - ie proper use of loops, in simple talk.

legibility - follow basic conventions, even if you can't stick tabs into everything, use helpful short variables, use structures of variables which breed simple reading and retrieval, where you can, just make it so that if you left it for a year and came back it would not take you a long time to see what it was doing, from scratch

changeability - if aspects of the process could change, don't be lazy, pre-empt them and create the processes so that what might need changing could easily be extracted and refitted, however you might want to in future

load-capability - data structures, and data i/o should take into account possible simultaneous usage by millions of users, so everything has to be thought through carefully. relying on nmainstream database systems is fine, eg sql, but whether or not you do that you must be the one to take care that your database can't suffer problems if too many users try and do certain things at the same time

security concious - when taking input from the world wide web, try and... jesus you have no hope. What you have to do is know exactly where a marauder would try and break that script open and fit it with bespoke extra security you could only understand if you could comprehend how to break it at all, which is classified information sadly - the obvious solution is of course (if you're wizardous enough) to fit fullscale live encryption-decryption on every last bit of i/o, thus enabling you to catch and kill even the most deadly hackers in the world, ie catch and kill their processes, not they themselves, for you may never even know who they are, even their IP could be a mask - and writing this helped me see that security point clearly, so now you know the value of brainwork too. I can go and fit the highest security on my machines this year and reduce breach capability to zero, oh yes. Mu ha ha ha. I think is what they say, in Americaworld.

(the result is) user-friendly - measurable not by whether someone says it's pretty or looks like facebook, but whether if 100,000 users pass through it they do, on average, all the things you hoped they would do with the site/app.

Last edited by CannonFodder; 01-10-2011 at 09:08 AM..
CannonFodder is offline
Reply With Quote
View Public Profile
 
Old 01-10-2011, 10:10 AM Re: Good Code
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
THROW IT ALL OUT AND START OVER AGAIN.

Jeremy, you think 3 1/2 months is a long time, I have a project from over 2 years ago that I'm only now finishing. Not because I didn't finish on time however, the customer just didn't finish contributing what they needed to, and put it on the shelf all this time. They did pay for all the work completed. Now that I'm working on code that's more than 2 years old, I really do wish I could start from scratch... har har.
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.
wayfarer07 is online now
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 01-15-2011, 10:24 PM Re: Good Code
Lashtal's Avatar
wherenomanhasgonebefore

Posts: 680
Name: Lashtal
Trades: 0
I really appreciate this thread. A joke, but not really a joke either.

I spend more time "improving" already-written code-snippets than I do writing even more code.

It is a vain attempt to write the "cleanest code possible". All it does it get in the way of production.
__________________
Currently Reading:
Please login or register to view this content. Registration is FREE
Lashtal is offline
Reply With Quote
View Public Profile
 
Old 02-17-2011, 06:12 PM Re: Good Code
Skilled Talker

Posts: 83
Trades: 0
Quote:
Originally Posted by NullPointer View Post

http://xkcd.com/844/

I was just thinking the other day, the more time I spend trying to design something that is intuitive, easy to manage, and simple to update the less likely it is I'll ever actually finish.

lol looks like Agile programming Envoirment.
__________________
»
Please login or register to view this content. Registration is FREE
- Interactive maps for websites
»
Please login or register to view this content. Registration is FREE
for web developers
DmitryS is offline
Reply With Quote
View Public Profile
 
Old 02-19-2011, 01:11 AM Re: Good Code
Lashtal's Avatar
wherenomanhasgonebefore

Posts: 680
Name: Lashtal
Trades: 0
I think a point that ought to be stressed here is writing clear comments next to code blocks.
__________________
Currently Reading:
Please login or register to view this content. Registration is FREE
Lashtal is offline
Reply With Quote
View Public Profile
 
Old 03-08-2011, 10:35 PM Re: Good Code
Banned

Posts: 2
Trades: 0
The most important thing to write a code is careful.
If you careless when writing code you maybe will lost a huge amount of time to them.
wulaishishei is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Good Code
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.51381 seconds with 12 queries