[Tutor] Python in HTML

Orri Ganel singingxduck at gmail.com
Sun May 22 16:04:26 CEST 2005


Alan G wrote:

>HI Orri,
>
>  
>
>>>OK, so what happened?
>>>      
>>>
>
>You still aren't telling us what happens. Its very hard to find
>a fault in a program when you have no idea what the problem is.
>The code is very likely doing what you have asked it to do,
>so when we read it it will seem to 'work' at a superficial level.
>
>Without a clear explanation of the problem you force the tutors
>to read every line closely, and speaking personally, I don't have
>enough free time for that, I need to know what I'm looking for.
>
>  
>
>>Well, like I said, the darkplayer is on an online journal, which
>>    
>>
>means
>  
>
>>that the only output possible is modifying the option strings of
>>    
>>
>songs
>  
>
>>as they are played or something similar.  I do know that the random
>>number generator works, and the songs played always match the option
>>selected.
>>    
>>
>
>So you got a version working that played the sings in random order?
>Or did you write separate programs, one that demonstrated the random
>generator working and another that played songs with diffrerent
>options?
>
>  
>
>>However, this was before adding the bit about copying the
>>songs and playing from the copy.
>>    
>>
>
>So if you forget about playing the songs can you copy the songs and
>generate a random selection from the copy?
>
>Alan G.
>
>
>  
>
Well, the language being Javascript, I unfortunately don't know what 
happened, because there are no IDE's for Javascript; it just fails 
silently, as Liam put it.  The last working copy I had was one in which 
there was a random number generator selecting random songs directly from 
the song list, meaning that songs were re-played before every song had 
been played once.  Since this sciprt goes into a 'javascript module' in 
a webjournal, the opportunity to write separate scripts is limited.  It 
also doesn't help that there are no Javascript IDE's available.  As far 
as I know, the problem lies within some small syntax error.  Or, it may 
be a completely different problem. Due to the lack of output when 
Javascript crashes, I just don't know.

-- 
Email: singingxduck AT gmail DOT com
AIM: singingxduck
Programming Python for the fun of it.



More information about the Tutor mailing list