Advertising (This ad goes away for registered users. You can Login or Register)

Read This First: Learning How to Program

Forum rules
Forum rule Nº 15 is strictly enforced in this subforum.
User avatar
codestation
Big Beholder
Posts: 1660
Joined: Wed Jan 19, 2011 3:45 pm
Location: /dev/negi

Re: Read This First: Learning How to Program

Post by codestation » Sun Jun 12, 2011 9:59 pm

ultimakillz wrote:but you can code all the variable names, output, comments, etc. in your native language as those do not matter to the computer
I dont think that he can use his native language (greek) in variable names. The only characters valid for identifiers are letters, numbers and underscore, so he is restricted to plain ASCII for that, but he can use whatever he wants to in comments and data.

@Howto, you can use any language, but the restricted keywords are gonna remain in english, also you are limited to simple letters and numbers for the variable names. As a recommendation stick to english in the source code, so if another person need to check your code he can understand it. Also don't abuse the #define macros or you could end programming something like this ;) :

Code: Select all

#define o putchar
#define O main
#define OoO int
#define Oo char
#define ooO return
Oo oO0[] = {0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x0a, 0x0};
OoO O(OoO oo, Oo **o0) {
	ooO oo ? O(oo ^ oo, (Oo **)oO0) : *(Oo *)o0 ? O(o(*(Oo *)o0) ^ *(Oo *)o0, (Oo **)((Oo *)o0+1)) : *(Oo *)o0;
}
And yes, C is so crazy that the above code is perfectly valid :D
Advertising
Plugin list
Working on: QPSNProxy, QCMA - Open source content manager for the PS Vita
Playing: Error: ENOTIME
Repositories: github, google code
Just feel the code..

Howto
Banned
Posts: 70
Joined: Thu May 12, 2011 12:03 pm

Re: Read This First: Learning How to Program

Post by Howto » Sun Jun 12, 2011 10:20 pm

thanks to all for the answers i now get it :D
@codestation LOL!
Advertising

User avatar
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: Read This First: Learning How to Program

Post by m0skit0 » Mon Jun 13, 2011 8:27 am

@leojava: thanks, didn't knew that.
@codestation: agreed, abusing #define is a bad practice IMHO.
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"

Terbaddo
Posts: 116
Joined: Mon Feb 14, 2011 3:29 pm
Location: Paris, France
Contact:

Re: Read This First: Learning How to Program

Post by Terbaddo » Mon Jun 13, 2011 8:59 am

@codestation :D
That is not Unix. That is OSX a proprietary branch of BSD.
MixShark NGPToolChain Dev Repository Homebrew World

Yosh
Posts: 93
Joined: Sat Apr 30, 2011 1:39 pm

Re: Read This First: Learning How to Program

Post by Yosh » Wed Jun 22, 2011 12:20 am

Any resource for mips learning, maybe ?

User avatar
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: Read This First: Learning How to Program

Post by m0skit0 » Wed Jun 22, 2011 7:03 am

I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"

Yosh
Posts: 93
Joined: Sat Apr 30, 2011 1:39 pm

Re: Read This First: Learning How to Program

Post by Yosh » Wed Jun 22, 2011 11:42 am

cool thx

iJimaniac
Posts: 90
Joined: Thu Jul 07, 2011 3:33 pm

Re: Read This First: Learning How to Program

Post by iJimaniac » Sat Jul 09, 2011 2:21 pm

great post!
This probably sounds stupid but how long do you think it would take me to make one homebrew, Im thinking of an alarm clock that has the weather. I unfortunately have no programing experience :(
Like I said stupid question but its just an idea.
Robin hood stole from the rich and gave too the poor,
Obama steals from the rich AND poor and gives to...
Robin Hood was the first welfare program!

User avatar
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: Read This First: Learning How to Program

Post by m0skit0 » Sun Jul 10, 2011 9:27 am

Give it a couple of years.
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"

iJimaniac
Posts: 90
Joined: Thu Jul 07, 2011 3:33 pm

Re: Read This First: Learning How to Program

Post by iJimaniac » Sun Jul 10, 2011 4:07 pm

m0skit0 wrote:Give it a couple of years.
Lol, thats what I figured,
so is there somewhere on this forum where I can request hombrews or submit homebrew ideas???
Robin hood stole from the rich and gave too the poor,
Obama steals from the rich AND poor and gives to...
Robin Hood was the first welfare program!

Post Reply

Return to “Programming and Security”