Hiram's Profile
Reputation: 69
Whiz
- Group:
- Active Members
- Active Posts:
- 203 (0.14 per day)
- Joined:
- 02-June 09
- Profile Views:
- 9,280
- Last Active:
Jan 25 2013 10:04 PM- Currently:
- Offline
Previous Fields
- Country:
- AU
- OS Preference:
- Linux
- Favorite Browser:
- Chrome
- Favorite Processor:
- Who Cares
- Favorite Gaming Platform:
- Who Cares
- Your Car:
- Who Cares
- Dream Kudos:
- 0
Latest Visitors
-
Joe daly 
22 Jan 2013 - 14:09 -
Markdrea 
22 May 2012 - 12:01 -
assert(C) 
12 Dec 2011 - 05:40 -
linuxnut 
10 Dec 2011 - 21:46 -
adolf625 
13 Sep 2011 - 09:25 -
poker158149 
07 Sep 2011 - 12:18 -
raziel_ 
07 Sep 2011 - 10:32 -
chrisH 
06 Sep 2011 - 10:10 -
Mikhail 
05 Sep 2011 - 18:51 -
timber-cub 
01 Sep 2011 - 03:57
Posts I've Made
-
In Topic: I wish Python would kill its self!
Posted 8 Oct 2011
I'm not even bothered by self
As mentioned by Simown and atraub, it's better to be explicit than implicit.
It's easier to explain self in Python than this in C++/Java to students not familiar with object oriented programming. In C++/Java, it seems like voodoo, seemingly coming out of no where, where as in Python, It's right there.
Quote
Why can't it simply assume we are referring to self? Wouldn't it be simpler to refer to external or globals by using an "global.variable_name" or some other method? It seems much more "rare" to refer to an external. Referring to self is so common, explicitly stating self is quite a headache.
Indeed, referring to self is quite common. But variables local to a method don't belong to the object, nor are they global.
public class Example { String name; public void method() { String name; name = "Where do I live?"; } }
Which variable is assigned the string assigned to? The answer to the question is irrelevant, what's relevant is that it had to be asked. In Python though...
class Example(object): def method(self): name = "Where do I live?"
There's no ambiguity. That's a local variable, without a doubt. Less wondering is a good thing
-
In Topic: Updating matrices
Posted 13 Sep 2011
You're appending the product to another list. If you return x instead, you'll get the output you want. Note that you aren't using initMatrix effectively, regardless of this change. -
In Topic: Legit question
Posted 8 Sep 2011
I'm pretty sure import medical works in Python. -
In Topic: What do you do when you're not at a computer?
Posted 5 Sep 2011
Awesome. Shall we name ourselves the Low Vitamin D club? -
In Topic: What do you do when you're not at a computer?
Posted 5 Sep 2011
Hmm, basically the only time I'm not on a computer is when I'm sleeping or having meetings. Even then the meetings often involve a laptop.
I'm on a computer all day at work, all night at home doing university work, on my phone when travelling to and from these places.
Occasionally I watch movies and such with my girlfriend, but our media server has a keyboard, so it's still a computer
I swear I'm going to need a tablet or something in my coffin when I die. How else will I keep up with the news!?
My Information
- Member Title:
- D.I.C Head
- Age:
- 24 years old
- Birthday:
- May 30, 1988
- Gender:
-
- Location:
- Brisbane, Australia
- Interests:
- I enjoy programming and long walks on the beach. Comics, anime and music are pretty cool too.
- Full Name:
- Nathan Hoad
- Years Programming:
- 3
- Programming Languages:
- Python, C++, Java, C, Pascal, SQL, PHP, Javascript.
Contact Information
- E-mail:
- Click here to e-mail me
- Website URL:
-
http://www.getoffmalawn.com
- Twitter:
- nathan_hoad
|
|


Find Topics
Find Posts
View Reputation Given
|
Comments
assert(C)
19 Oct 2011 - 07:42timber-cub
01 Sep 2011 - 03:59assert(C)
27 Jul 2011 - 08:04assert(C)
23 Jul 2011 - 05:44assert(C)
22 Jul 2011 - 01:52assert(C)
21 Jul 2011 - 05:32