Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
General questions
#1
Prologue::: 
Old guy here... been doing I.T. (Networking) for over 25 years now... and for the most part had a "scripter" on the team, so I never HAD to learn*.
written a few Bash scripts when needed, but nothing substantial. 

So here's a few questions, and simply looking for best practices or tricks of the trade etc...not expecting finite answers.

1) Context switching
So, I'm not writing code most of the day;  again, I'm neck deep in OSPF & BGP and VPNs, all day etc.  So when I work (code) on my little app, I'm finding I forget "where I'm at".  Did I leave the code in a working state? What section of code was I working on last...shoot -- what issue/problem (business/project-wise) was I working on?

Now it seems obvious I could jot down in a notepad these things, but often, as it's not my primary gig, I'll get distracted/interrupted/sleepy, pick one...and I'll simply hit save, and close the lid of the laptop.

It's possible that due to it being "new", the learning curve, etc...that this will get better simply by coding more...but I'm finding my tricks for networking context-switching don't seem to be as effective for coding.   And yes, I am commenting as I go (otherwise I'd be at a total loss).

2) Saves
How often do you pick up code from yesterday, write, edit, erase code, etc and save it to a new filename ?  Depends? (on amount of change)?  3 times a day, 30 times?  For networking, it's typically a "live" system.  I'm not constantly tweaking an OSPF configuration for the same network.    Again, not really looking for a singular answer, but what's common practice, or what's worked for you.

3) Rewrites
I've found myself coming back the next day, looking at my code and thinking -- yea it works, but I think there's a better way to code piece-X  -- and then spending the night on rewriting code that previously was working (maybe not elegantly) rather than moving on to the next piece of the puzzle.  Good thing or finish the damn project then look at improvements/efficiencies?

General questions but after a week of python, #1 & 3 I feel are possibly hindering progress, and #2 came about because I was sooooo happy that a function I wrote & saved in save-3, then nuked in edit-4 and needed in edit-19 was there in a file #3.

Thanks,
PappaBear
* actually learned basic & pascal on Commodore-64  :-) but that was in 83 and doesn't count.
Reply


Messages In This Thread
General questions - by PappaBear - Apr-11-2017, 05:57 AM
RE: General questions - by Larz60+ - Apr-11-2017, 11:39 AM
RE: General questions - by zivoni - Apr-11-2017, 12:53 PM
RE: General questions - by sparkz_alot - Apr-11-2017, 01:26 PM
RE: General questions - by PappaBear - Apr-11-2017, 03:22 PM
RE: General questions - by sparkz_alot - Apr-11-2017, 04:11 PM
RE: General questions - by wavic - Apr-11-2017, 05:40 PM
RE: General questions - by sparkz_alot - Apr-11-2017, 07:59 PM
RE: General questions - by metulburr - Apr-11-2017, 08:56 PM
RE: General questions - by Larz60+ - Apr-11-2017, 10:01 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020