10 advices for successful programming

  • (2 Pages)
  • +
  • 1
  • 2

15 Replies - 16106 Views - Last Post: 28 March 2012 - 08:32 AM

#1 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3524
  • View blog
  • Posts: 10,169
  • Joined: 08-June 10

10 advices for successful programming

Post icon  Posted 16 March 2012 - 03:07 AM

*
POPULAR

a list every new programmer should read after getting up and before going to sleep ...

  • RTFM
  • STFW, you're most probably not the first person having that particular problem
  • don't assume anything. if in doubt, check the documentation
  • code for errors (be paranoid, everyone wants to exploit your code)
  • indent your code
  • comment your code
  • never ever trust user data
  • separate languages
  • use the appropriate language for a given problem. i.e. don't try to solve SQL/HTML/Javascript/... issues with PHP
  • know what PHP is intended to do (what it can do and what it can't)
  • logic first, code afterwards. make clear (visualize) what you want to do and how the programme logic should go

would you add/remove something to/from the list?

word your opinion, now!

Is This A Good Question/Topic? 12
  • +

Replies To: 10 advices for successful programming

#2 Curtis Rutland  Icon User is online

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 4463
  • View blog
  • Posts: 7,780
  • Joined: 08-June 10

Re: 10 advices for successful programming

Posted 16 March 2012 - 08:38 AM

For those curious, I believe "STFW" means "search the f------ web", insert the f-word of your choice.

By the way, this isn't just a PHP list, most of this can be said for any language.
Was This Post Helpful? 0
  • +
  • -

#3 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9088
  • View blog
  • Posts: 34,139
  • Joined: 12-June 08

Re: 10 advices for successful programming

Posted 16 March 2012 - 08:57 AM

Firetruck?

I think quite of a bit of this subject could be distilled from the last 'ask the experts'.
Was This Post Helpful? 0
  • +
  • -

#4 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3524
  • View blog
  • Posts: 10,169
  • Joined: 08-June 10

Re: 10 advices for successful programming

Posted 16 March 2012 - 09:11 AM

View Postmodi123_1, on 16 March 2012 - 04:57 PM, said:

I think quite of a bit of this subject could be distilled from the last 'ask the experts'.

Im a chemist, I know how to distill *gg*


for me the most part of 'ask the experts' was about how to get a job in IT.
Was This Post Helpful? 0
  • +
  • -

#5 CTphpnwb  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2934
  • View blog
  • Posts: 10,134
  • Joined: 08-August 08

Re: 10 advices for successful programming

Posted 16 March 2012 - 12:32 PM

I would add:
Functions are your friends. Use them! Breaking big problems into small ones is a fundamental part of programming. If you aren't using functions then how are you going to get to more advanced levels?
Was This Post Helpful? 2
  • +
  • -

#6 Slice  Icon User is offline

  • sudo pacman -S moneyz


Reputation: 242
  • View blog
  • Posts: 706
  • Joined: 24-November 08

Re: 10 advices for successful programming

Posted 16 March 2012 - 03:12 PM

Find a program you're comfortable using to write code. Even basic syntax highlighting is better than nothing.
Was This Post Helpful? 1
  • +
  • -

#7 thrca  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 28
  • View blog
  • Posts: 65
  • Joined: 21-January 12

Re: 10 advices for successful programming

Posted 17 March 2012 - 09:30 AM

View PostSlice, on 16 March 2012 - 03:12 PM, said:

Find a program you're comfortable using to write code. Even basic syntax highlighting is better than nothing.


People write code in something other than textpad or vi? <scratches head in a confused manner>
Was This Post Helpful? 0
  • +
  • -

#8 hiddenghost  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 39
  • View blog
  • Posts: 621
  • Joined: 15-December 09

Re: 10 advices for successful programming

Posted 17 March 2012 - 08:07 PM

I would add:
Test smaller chunks of code first then combine them later.

It kind of goes along with what CTphpnwb said about functions.

Smaller chunks of code are really easy to debug compared to many many lines.
Was This Post Helpful? 0
  • +
  • -

#9 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3524
  • View blog
  • Posts: 10,169
  • Joined: 08-June 10

Re: 10 advices for successful programming

Posted 18 March 2012 - 01:47 AM

I would count that (both) as programme logic. a more in-dephth explanation of the last point, so-to-speak.
Was This Post Helpful? 0
  • +
  • -

#10 e_i_pi  Icon User is offline

  • = -1
  • member icon

Reputation: 795
  • View blog
  • Posts: 1,681
  • Joined: 30-January 09

Re: 10 advices for successful programming

Posted 19 March 2012 - 05:47 PM

I'd suggest studying up on scope, and avoid using globals when you don't need globals.
Was This Post Helpful? 0
  • +
  • -

#11 hiddenghost  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 39
  • View blog
  • Posts: 621
  • Joined: 15-December 09

Re: 10 advices for successful programming

Posted 25 March 2012 - 10:57 PM

View PostDormilich, on 18 March 2012 - 03:47 AM, said:

I would count that (both) as programme logic. a more in-dephth explanation of the last point, so-to-speak.


Ya that too.
Though I have had problems unrelated to logic that were hard to find because of too much code to look through.
For instance mispelling of a variable name, or semicolon left off.
You know...the stupid stuff. :censored:
Was This Post Helpful? 0
  • +
  • -

#12 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3524
  • View blog
  • Posts: 10,169
  • Joined: 08-June 10

Re: 10 advices for successful programming

Posted 25 March 2012 - 11:14 PM

View Posthiddenghost, on 26 March 2012 - 07:57 AM, said:

Though I have had problems unrelated to logic that were hard to find because of too much code to look through.

breaking code into sufficiently small parts also counts as programme logic *gg*
Was This Post Helpful? 0
  • +
  • -

#13 hiddenghost  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 39
  • View blog
  • Posts: 621
  • Joined: 15-December 09

Re: 10 advices for successful programming

Posted 26 March 2012 - 04:34 AM

View PostDormilich, on 26 March 2012 - 01:14 AM, said:

View Posthiddenghost, on 26 March 2012 - 07:57 AM, said:

Though I have had problems unrelated to logic that were hard to find because of too much code to look through.

breaking code into sufficiently small parts also counts as programme logic *gg*


whoops. I guess thinking is logic too. :whistling:
Was This Post Helpful? 0
  • +
  • -

#14 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3524
  • View blog
  • Posts: 10,169
  • Joined: 08-June 10

Re: 10 advices for successful programming

Posted 26 March 2012 - 04:40 AM

good point. I should add: think before you do something.
Was This Post Helpful? 0
  • +
  • -

#15 hiddenghost  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 39
  • View blog
  • Posts: 621
  • Joined: 15-December 09

Re: 10 advices for successful programming

Posted 26 March 2012 - 04:46 AM

And that's something I have trouble with.
Though I am pretty good at daydreaming.

This post has been edited by hiddenghost: 26 March 2012 - 04:47 AM

Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2