I'm back

Jun 26, 2013 at 1:21am
I'm probably unknown anyway, (check out my post count hahaha), but the reason I left the forums for a bit, was that I was doing python at school. Because of my nooby programming skills, I could not handle 2 languages, and c++ fell to the side...until now!

So I'm back, and I'm also taking an instructed course right now to help me along, and I'll probably post some help from that class here.

Thanks!
Jun 26, 2013 at 2:19am
closed account (Dy7SLyTq)
this may seem like a stalker question (ill explain why i want to know it if you answer) but where do you place your {}'s
Jun 26, 2013 at 6:54am
@DTS is this because you believe python programmer's place their brackets in specific places?
If so, I started with python for four years and this is how I do it:
1
2
3
int main() {
	return(0);
}


@OP Don't know you, but welcome back. I hope you are a benefit to our community.
Jun 26, 2013 at 10:44am
closed account (N36fSL3A)
I hate you Script coder. D; Never put brackets in those places.

Anyway welcome back Zincott (Never saw you though.. O_o) I hope you have a nice time back here at these wonderful forums.
Jun 26, 2013 at 12:04pm
I don't know a great deal about python, but are there even brackets in python? I thought it just used indentation...
Jun 26, 2013 at 12:21pm
closed account (N36fSL3A)
No, there aren't brackets that I know of.
Jun 26, 2013 at 12:54pm
Nope no brackets, but the indentation scheme could cause programmers to use brackets in other languages differently.

I hate you Script coder. D; Never put brackets in those places.

Lol, a very simple solution: don't read my code.
Jun 26, 2013 at 1:29pm
@Script Coder
Nothing wrong with your code.

I laugh that so many people complain about the placing of the brackets. If you look at Bjarne's book and the "C++ in-depth" series he supervised, the code in all of it is:
1
2
3
4
5
6
7
8
9
int main(){
      while(){
            if(){
            }
            else{
            }
      }
      return 0;
}
Jun 26, 2013 at 1:32pm
closed account (1yR4jE8b)
Linux Kernel Style Guide: https://www.kernel.org/doc/Documentation/CodingStyle
Jun 26, 2013 at 3:07pm
Python does have brackets. And parentheses and braces. It doesn't use braces for scoping because it uses FORCED INDENTATION OF CODE instead. It uses braces to declare dict objects.
Jun 26, 2013 at 3:51pm
@chrisname ah, yes. I was only thinking of code indentation.
@BHXSpecter and darkestfright thank you for helping me prove to fredbill that the way I use brackets is perfectly fine :P
Jun 26, 2013 at 5:33pm
closed account (Dy7SLyTq)
@scriptcoder: no its beacuse i use
function, if, while, etc
{
}
also python doesnt use {} except for array and array style objects
Jun 26, 2013 at 5:43pm
@DTS Ah, then it was a really random connection:
"Hi I'm back"
"Do you code like this or this"
lol :)

how many of you guys follow the linux kernel system?
Jun 26, 2013 at 5:47pm
closed account (N36fSL3A)
Well the creator has horrible coding styles IMO.
Jun 26, 2013 at 5:52pm
I used to follow the Linux coding style but I don't any more. When I came across it, I was using 4-space indents instead of 8-space tab indents, but otherwise identical to the Linux style. Then I switched to using tab for indent and spaces for formatting. A while ago I switched back to just spaces because spaces are better for formatting, are more portable (space indents look the same on all text editors whereas tab often looks different due to different settings), and also because 8-space tabs indent way too much when you use 80 chars per line (which I do, and which the Linux kernel coding style suggests).
Topic archived. No new replies allowed.