Lounge of Tomorrow

€uromeinke, FEJ. and Ghoulish Delight RULE!!! NA abides.  


Go Back   Lounge of Tomorrow > A.S.C.O.T > Egg Head
Swank Swag
FAQ Members List Calendar Today's Posts Clear Unread

Reply
 
Thread Tools Search this Thread Display Modes
Old 05-14-2010, 02:10 PM   #1
Kevy Baby
Chowder Head
 
Kevy Baby's Avatar
 
Join Date: Jan 2005
Location: Yes
Posts: 18,500
Kevy Baby is the epitome of coolKevy Baby is the epitome of coolKevy Baby is the epitome of coolKevy Baby is the epitome of coolKevy Baby is the epitome of coolKevy Baby is the epitome of coolKevy Baby is the epitome of coolKevy Baby is the epitome of coolKevy Baby is the epitome of coolKevy Baby is the epitome of coolKevy Baby is the epitome of cool
Quote:
Originally Posted by scaeagles View Post
At 6'1, I am the 2nd shortest person in my 8 person development department. Shortest guy is 6'0. I would guess that means no.
Yeah, but your, well... you
__________________
The thing about quotes on the internet is that you cannot verify their validity.
- Abraham Lincoln
Kevy Baby is offline   Submit to Quotes Reply With Quote
Old 05-27-2010, 10:39 AM   #2
Ghoulish Delight
I Floop the Pig
 
Ghoulish Delight's Avatar
 
Join Date: Jan 2005
Location: Alternative Swankstyle
Posts: 19,348
Ghoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of cool
Send a message via AIM to Ghoulish Delight Send a message via Yahoo to Ghoulish Delight
Wow. In just 2 weeks I've learned (and retained) more about programming (well, Python) than the whole of the last 14 years combined. It's amazing how much easier it is to make sense of it all when I have a practical goal that I actually give a crap about rather than arbitrary exercises thought up by professors and text book writers. Concepts that I once only vaguely grasped in isolation but could never wrap my brain around how to use them in any sort of practical code are suddenly crystal clear.
__________________
'He who receives an idea from me, receives instruction himself without lessening mine; as he who lights his taper at mine, receives light without darkening me.'
-TJ

Ghoulish Delight is offline   Submit to Quotes Reply With Quote
Old 05-27-2010, 10:44 AM   #3
Disneyphile
SQUIRREL!
 
Disneyphile's Avatar
 
Join Date: Jan 2005
Location: On the curbside.
Posts: 5,098
Disneyphile is the epitome of coolDisneyphile is the epitome of coolDisneyphile is the epitome of coolDisneyphile is the epitome of coolDisneyphile is the epitome of coolDisneyphile is the epitome of coolDisneyphile is the epitome of coolDisneyphile is the epitome of coolDisneyphile is the epitome of coolDisneyphile is the epitome of coolDisneyphile is the epitome of cool
GD, for Action Script, I look for basic code online (most programmers share code), cut and paste it, then modify it to my needs.

Not sure if that can work in other languages, but it's a huge time saver in AS. I still have to know what the code is doing in order to modify it, but I've been able to accomplish some really awesome stuff in a short period of time with "starter code".
Disneyphile is offline   Submit to Quotes Reply With Quote
Old 05-27-2010, 10:49 AM   #4
Ghoulish Delight
I Floop the Pig
 
Ghoulish Delight's Avatar
 
Join Date: Jan 2005
Location: Alternative Swankstyle
Posts: 19,348
Ghoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of cool
Send a message via AIM to Ghoulish Delight Send a message via Yahoo to Ghoulish Delight
What I'm coding is pretty low-level and specific, there aren't many people who are trying to accomplish exactly what I am, so there's not much code that I can simply paste. Plus, as a general rule, I learn better by building up rather than untangling existing code. But as a source of examples of how individual calls and commands work, the internet is obviously invaluable.
__________________
'He who receives an idea from me, receives instruction himself without lessening mine; as he who lights his taper at mine, receives light without darkening me.'
-TJ

Ghoulish Delight is offline   Submit to Quotes Reply With Quote
Old 05-27-2010, 11:18 AM   #5
Ghoulish Delight
I Floop the Pig
 
Ghoulish Delight's Avatar
 
Join Date: Jan 2005
Location: Alternative Swankstyle
Posts: 19,348
Ghoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of cool
Send a message via AIM to Ghoulish Delight Send a message via Yahoo to Ghoulish Delight
Incidentally, I have a question for anyone familiar with Python.

Is there a way to tell the interpreter that certain commands MUST be executed in order?

e.g.

Quote:
class MyClass():
....def __init__(self, var1):
....self.var1=var1

....def Method1(self):
........subprocess.call("os call")
........return


def main():
....ClassList=[]

....for i in range(5):
........ ClassList.append(MyClass(i))

....for j in ClassList:
........j.Method1()
........subprocess.call("os call")
........ other work




main()
When I run this and it gets to that 2nd loop instead of executing as:
ClassList[0].Method1()
subprocess.call
other work
ClassList[1].Method1()
subprocess.call
other work
ClassList[2].Method1(0
....

I get:
ClassList[0].Method1()
ClassList[1].Method1()
ClassList[2].Method1()
ClassList[3].Method1()
ClassList[4].Method1()
subprocess.call
other work
subprocess.call
other work
subprocess.call
other work
subprocess.call
other work
subprocess.call
other work


Clearly what's happening is that the interpreter looks at Method1, decides that it's not doing anything that is internally dependent on order of execution, so it optimizes by lumping all 5 executions together. The problem is, the results of the subprocess call ARE dependent on order of execution.

I came up with a workaround. I threw a dummy variable assignment (garbage=self.var1) at the end of Method1. That's enough to convince the interpreter that work is being done and it should keep things in order. But that seems inelegant. Is there a better way to stop the interpreter from thinking it knows better than me?
__________________
'He who receives an idea from me, receives instruction himself without lessening mine; as he who lights his taper at mine, receives light without darkening me.'
-TJ

Ghoulish Delight is offline   Submit to Quotes Reply With Quote
Old 05-28-2010, 10:18 AM   #6
Pirate Bill
Quality since 1973
 
Pirate Bill's Avatar
 
Join Date: Dec 2007
Location: Right here
Posts: 473
Pirate Bill is the epitome of coolPirate Bill is the epitome of coolPirate Bill is the epitome of coolPirate Bill is the epitome of coolPirate Bill is the epitome of coolPirate Bill is the epitome of coolPirate Bill is the epitome of coolPirate Bill is the epitome of coolPirate Bill is the epitome of coolPirate Bill is the epitome of coolPirate Bill is the epitome of cool
Quote:
Originally Posted by Ghoulish Delight View Post
When I run this and it gets to that 2nd loop instead of executing as:
ClassList[0].Method1()
subprocess.call
other work
ClassList[1].Method1()
subprocess.call
other work
ClassList[2].Method1(0
....

I get:
ClassList[0].Method1()
ClassList[1].Method1()
ClassList[2].Method1()
ClassList[3].Method1()
ClassList[4].Method1()
subprocess.call
other work
subprocess.call
other work
subprocess.call
other work
subprocess.call
other work
subprocess.call
other work
My understanding of Python is rather basic, but I think I see the problem. You need to indent the For j loop so it's nested in the For i loop.

ETA: I just reread and this probably won't work either. Meh, it was a shot.
Pirate Bill is offline   Submit to Quotes Reply With Quote
Old 05-27-2010, 11:37 AM   #7
Kevy Baby
Chowder Head
 
Kevy Baby's Avatar
 
Join Date: Jan 2005
Location: Yes
Posts: 18,500
Kevy Baby is the epitome of coolKevy Baby is the epitome of coolKevy Baby is the epitome of coolKevy Baby is the epitome of coolKevy Baby is the epitome of coolKevy Baby is the epitome of coolKevy Baby is the epitome of coolKevy Baby is the epitome of coolKevy Baby is the epitome of coolKevy Baby is the epitome of coolKevy Baby is the epitome of cool
I don't know why I keep clicking in this thread.
__________________
The thing about quotes on the internet is that you cannot verify their validity.
- Abraham Lincoln
Kevy Baby is offline   Submit to Quotes Reply With Quote
Old 05-27-2010, 07:38 PM   #8
lindyhop
Swing Swank
 
lindyhop's Avatar
 
Join Date: Jan 2005
Location: Long Beach
Posts: 997
lindyhop is the epitome of coollindyhop is the epitome of coollindyhop is the epitome of coollindyhop is the epitome of coollindyhop is the epitome of coollindyhop is the epitome of coollindyhop is the epitome of coollindyhop is the epitome of coollindyhop is the epitome of coollindyhop is the epitome of coollindyhop is the epitome of cool
Send a message via AIM to lindyhop
Quote:
Originally Posted by Kevy Baby View Post
I don't know why I keep clicking in this thread.
I don't know why I scanned through the whole thing looking for words that made sense. But I believe the subject at hand is robust hard coding pythons. Not sure what's so interesting about that.
__________________
Hyperbole is the best thing ever!
lindyhop is offline   Submit to Quotes Reply With Quote
Old 05-27-2010, 08:47 PM   #9
Cadaverous Pallor
ohhhh baby
 
Cadaverous Pallor's Avatar
 
Join Date: Jan 2005
Location: Parental Bliss
Posts: 12,364
Cadaverous Pallor is the epitome of coolCadaverous Pallor is the epitome of coolCadaverous Pallor is the epitome of coolCadaverous Pallor is the epitome of coolCadaverous Pallor is the epitome of coolCadaverous Pallor is the epitome of coolCadaverous Pallor is the epitome of coolCadaverous Pallor is the epitome of coolCadaverous Pallor is the epitome of coolCadaverous Pallor is the epitome of coolCadaverous Pallor is the epitome of cool
Send a message via AIM to Cadaverous Pallor Send a message via Yahoo to Cadaverous Pallor
Quote:
Originally Posted by lindyhop View Post
robust hard coding pythons
"Ooohhhh, IT Guy....your coding is so hard....so....robust...."
__________________
The second star to the right
shines in the night for you
Cadaverous Pallor is offline   Submit to Quotes Reply With Quote
Old 05-28-2010, 04:16 AM   #10
Moonliner
8/30/14 - Disneyland -10k or Bust.
 
Moonliner's Avatar
 
Join Date: Jan 2005
Posts: 9,022
Moonliner is the epitome of coolMoonliner is the epitome of coolMoonliner is the epitome of coolMoonliner is the epitome of coolMoonliner is the epitome of coolMoonliner is the epitome of coolMoonliner is the epitome of coolMoonliner is the epitome of coolMoonliner is the epitome of coolMoonliner is the epitome of coolMoonliner is the epitome of cool
Send a message via AIM to Moonliner Send a message via MSN to Moonliner Send a message via Yahoo to Moonliner
Quote:
Originally Posted by Cadaverous Pallor View Post
"Ooohhhh, IT Guy....your coding is so hard....so....robust...."
I was always pretty handy with recursion.
Moonliner is offline   Submit to Quotes Reply With Quote
Reply



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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -7. The time now is 10:58 PM.


Lunarpages.com Web Hosting

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.