Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Programming Brain-Cramp

by SparkeyG (Curate)
on Aug 20, 2001 at 08:42 UTC ( #106132=note: print w/replies, xml ) Need Help??

in reply to Programming Brain-Cramp

How's this for you?
Late night programming back at University, I got the project to compile and respond properly to test data.

Success thought I. Since the prof took of points for style of code, I figured I would clean up the code... After cleaning up the code, removing debug print statements, renaming varibles from c1 to innerLoopCounter, and the like, the code compiled.
I turned in the project, took the test, and as I was leaving the TA took me aside and asked why I had turned in a non-working project. I was confused, it worked last night...
Ended up scouring 2.5kloc for wtf I did wrong when I tried to 'clean up' the code. Ended up I had renamed the same var in two different places. *DOH!!!!*
The lesson for the day? -- Don't fix, what ain't broken.


Replies are listed 'Best First'.
Re: Re: Programming Brain-Cramp
by Anonymous Monk on Aug 21, 2001 at 05:27 UTC
    I'd say that the lesson that day was "Use real var names during development"

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://106132]
[Corion]: Meh. I think I have now the parts down that I want from a simple Javascript frontend for single-page- applications with a aPerl backend. But it seems that all Javascript templating modules either don't support two-way binding (which would be nice) or ...
[Corion]: ... don't support server-side precompilation (which means the client has to compile all templates to Javascript themselves), or are giant frameworks that expect to do everything (which is not what I want)
[Corion]: I feel that there is a talk somewhere in there, either about the structure and parts, or how I used several parts to get a complete whole.
[Corion]: Maybe I can still find something that is compatible with handlebars.js (which has JS precompilation) but allows for two-way data binding (which is great for the UI)

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2017-03-30 07:50 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (355 votes). Check out past polls.