Jump to content

  • Log In with Google      Sign In   
  • Create Account


Using a Notepad in Industry to keep track of modified code


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
22 replies to this topic

#1 warnexus   Prime Members   -  Reputation: 1397

Like
1Likes
Like

Posted 14 November 2013 - 05:41 PM

Is that common to have a programmer have a notepad in front of him/her keep track of code that was modified (ie: list before and after code comparison, line location from the IDE)?

 

I figure if someone modifies something, there might be a chance something else might break in a different area of the program. So this would be a good way to revert the issue.

 

I never worked in the industry. I am still a CS undergraduate but I was curious about whether or not this is actually how it works in industry.



Sponsor:

#2 ApochPiQ   Moderators   -  Reputation: 14666

Like
11Likes
Like

Posted 14 November 2013 - 05:43 PM

There's a whole set of software tools known as version control (or "revision control") which solve this problem far more powerfully than doing it by hand.

#3 Paradigm Shifter   Crossbones+   -  Reputation: 5232

Like
0Likes
Like

Posted 14 November 2013 - 05:52 PM

Yeah use software to track changes (also called source control). I'm surprised they don't teach you about that in uni. SVN and SourceSafe are 2 I have used in the past (Git has been mentioned too, not used it).

 

I'm a firm believer in notepads though, notepads don't crash and lose your data. Best notepads are hardbound and you can't rip pages out. Always keep your old notepads. It's also best to date each entry. (Not "sexy time" date, calendar date).

 

EDIT: Biggest problem with notepads is illegible writing ;)


Edited by Paradigm Shifter, 14 November 2013 - 05:53 PM.

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

#4 Hodgman   Moderators   -  Reputation: 28605

Like
5Likes
Like

Posted 14 November 2013 - 06:04 PM

I usually have a notepad for task lists, scribbling down ideas / solving problems, and explaining things to people visually (but no, not for line numbers / change logs).

 

As mentioned above, if you want to see which lines of code you changed, your VCS program can tell you ;) Usually it's as simple as right clicking on the file and selecting "show diff". If you want to see what you changed in the past, you right click on a file/folder and bring up the log, which then lets you see who's changed it on which date with what description (and then open up a diff of each file they modified and see the line-by-line changes).

 

There's also a tool called "blame", where you can highlight a particular line of code that you're interested in, and the VCS program will tell you when this line was written and by whom.

 

Personally, I use git for my code these days... but I'd probably recommend Subversion (and TortoiseSVN for integration with Windows Explorer) as it's easier to learn.


Edited by Hodgman, 14 November 2013 - 06:08 PM.


#5 swiftcoder   Senior Moderators   -  Reputation: 9761

Like
4Likes
Like

Posted 14 November 2013 - 06:50 PM


Personally, I use git for my code these days... but I'd probably recommend Subversion (and TortoiseSVN for integration with Windows Explorer) as it's easier to learn.

I don't want to take us too far off topic, but I'd go exactly the other direction on this.

 

SVN is full of odd little pitfalls that only occur in weird edge-cases, whereas git has a very simple set of base operations which tend to be self-consistent. Yes, advanced operations are unintuitive in both, but SVN is hair raising...


Tristam MacDonald - Software Engineer @Amazon - [swiftcoding]


#6 warnexus   Prime Members   -  Reputation: 1397

Like
0Likes
Like

Posted 14 November 2013 - 11:45 PM

There's a whole set of software tools known as version control (or "revision control") which solve this problem far more powerfully than doing it by hand.

Interesting.



#7 warnexus   Prime Members   -  Reputation: 1397

Like
0Likes
Like

Posted 14 November 2013 - 11:47 PM

Yeah use software to track changes (also called source control). I'm surprised they don't teach you about that in uni. SVN and SourceSafe are 2 I have used in the past (Git has been mentioned too, not used it).

 

I'm a firm believer in notepads though, notepads don't crash and lose your data. Best notepads are hardbound and you can't rip pages out. Always keep your old notepads. It's also best to date each entry. (Not "sexy time" date, calendar date).

 

EDIT: Biggest problem with notepads is illegible writing ;)

What course do they teach about source control? I'm a CS undergraduate and I am taking 2 CS Classes this semester: Computer Architecture and Discrete Structures.



#8 Dragonsoulj   Crossbones+   -  Reputation: 2031

Like
1Likes
Like

Posted 15 November 2013 - 12:10 AM

As this thread is relevant, and recent: http://www.gamedev.net/topic/650027-version-control-and-programming-with-a-team/



#9 l0calh05t   Members   -  Reputation: 672

Like
0Likes
Like

Posted 15 November 2013 - 01:22 AM

 

Yeah use software to track changes (also called source control). I'm surprised they don't teach you about that in uni. SVN and SourceSafe are 2 I have used in the past (Git has been mentioned too, not used it).

 

I'm a firm believer in notepads though, notepads don't crash and lose your data. Best notepads are hardbound and you can't rip pages out. Always keep your old notepads. It's also best to date each entry. (Not "sexy time" date, calendar date).

 

EDIT: Biggest problem with notepads is illegible writing ;)

What course do they teach about source control? I'm a CS undergraduate and I am taking 2 CS Classes this semester: Computer Architecture and Discrete Structures.

 

there are usually no courses directly related to source control, however it will often be used in larger practical excercises.

 

In any case, beside git and svn you could also check out (vcs pun, yay!) perforce, which is quite commonly used in industry and free for up to 20(?) users.



#10 TheComet   Members   -  Reputation: 1460

Like
0Likes
Like

Posted 15 November 2013 - 02:12 AM

I'm a firm believer in notepads though, notepads don't crash and lose your data.

 

Then there's something seriously wrong with the version control software you're using.


YOUR_OPINION >/dev/null


#11 Dragonsoulj   Crossbones+   -  Reputation: 2031

Like
0Likes
Like

Posted 15 November 2013 - 02:35 AM

 

I'm a firm believer in notepads though, notepads don't crash and lose your data.

 

Then there's something seriously wrong with the version control software you're using.

 

 

Or there is a lack of redundancy.



#12 Felix Ungman   Members   -  Reputation: 952

Like
1Likes
Like

Posted 15 November 2013 - 02:36 AM

As a solo programmer, I've found git far more useful than svn. Once you understand how it works, it's extremely easy to set up, branch off modifications, compare those changes, and merge them together. I would never dream of doing this by hand.


openwar  - the real-time tactical war-game platform


#13 Dragonsoulj   Crossbones+   -  Reputation: 2031

Like
0Likes
Like

Posted 15 November 2013 - 02:37 AM

What about Mercurial?



#14 TheComet   Members   -  Reputation: 1460

Like
1Likes
Like

Posted 15 November 2013 - 04:47 AM

What about Mercurial?

 

...And it begins.

 

Git vs. Mercurial: Please Relax (Git is MacGyver and Mercurial is James Bond)

The Differences Between Mercurial and Git

Git is Wesley Snipes, Mercurial is Denzel Washington

 

My honest opinion on Mercurial: To me it feels like Mercurial is just unnecessary. It does everything git does, only slower, and it's missing a few features. Plus the name "Mercurial" is unfortunate. Not catchy and doesn't "feel" good. That's just my opinion. I'm not denying Mercurial is a good VCS; quite the contrary, it does what it's designed to do and it does it well.

 

If you tell me to use Mercurial over Git, though, the reason I wouldn't switch is not because I prefer git, but because the time it would take to learn how to use Mercurial would outweigh the supposed benefit you claim it has.

 

I'll quote the first article. The bottom line is:

 

  1. Evaluate your workflow and decide which tool suits you best.
  2. Learn how to use your chosen tool as well as you possibly can.
  3. Help newbies to make the transition.
  4. Shut up about the tools you use and write some code.

 

 


Edited by TheComet, 15 November 2013 - 04:50 AM.

YOUR_OPINION >/dev/null


#15 wintertime   Members   -  Reputation: 1640

Like
0Likes
Like

Posted 15 November 2013 - 09:06 AM

Mercurial is not slow. I switched from Mercurial (also called hg if you find that more catchy) to using git, but only because there are a few corner cases where it is more flexible. The downside is git got obscure commands you need to type in with ambiguities, 2 commands for same thing and 1 command doing 3 things.

hg you can learn in a day with easy commands you can even shorten when you type them in and rarely needs extra switches. Command names also have similar meaning as in SVN if you switch from it. Turtoise hg is also nice, I think they programmed it from scratch for hg only using the pictures of Turtoise SVN.

git you need to study and google for commands and dozens of switches per command for years to come. If you used SVN first, google every command, because all got intentionally renamed and do something else if you type in the original command. Turtoise git you better not use, I think that got into live as an awkward mutation of Turtoise SVN and did not fit git well.

 

The good thing of both compared to SVN is you can easily setup a repository, have everything locally on your computer without needing constant access to a server, you can easily setup a repository on an USB stick and push from your HDD to it to have a local backup in case the HDD or the server blows up and merging (and you can additionally rebase) is so much easier.


Edited by wintertime, 15 November 2013 - 09:23 AM.


#16 Starnick   Members   -  Reputation: 1167

Like
0Likes
Like

Posted 15 November 2013 - 01:34 PM

From my college experience, maybe one or two professors touched on source control for a total of five minutes. There wasn’t a specific class for it nor was it mandated in any class to be used (or encouraged to be used at all really). It was one of those things that I learned on my own and used on my own, and mandated for the team projects that I was a part of.

 

As far as I can tell, that’s more or less the common story. You wouldn’t believe how often we get soon-to-be-new graduates coming in for interviews and they only have “vaguely” heard of source control.

 

As for notepads, I like those big yellow legal pads myself. Always have a stack of them in my drawer, and always one open beside me while working. Very useful for notes during debugging or sketching out new ideas or designs. That may range from literally diagramming something in 2D or fleshing out an algorithm in pseudo code. It’s a good habit in my opinion.


Edited by Starnick, 15 November 2013 - 01:34 PM.


#17 sol_aries   Members   -  Reputation: 128

Like
0Likes
Like

Posted 15 November 2013 - 02:33 PM

Yes, I do it all the time.  Perforce or Git don't really track that or the relationships between different files or calls.  It's easy to forget or have a hard time finding what you're looking for in perforce because it can be hard to forsee future needs.

 

I also write general notes on the files I'm working on or of interest to me, function and line numbers I'm interested in, reminders, TODO lists, math, call graphs, etc.

 

In general if you find a habit of yours is proving useful, keep doing it :)



#18 wintertime   Members   -  Reputation: 1640

Like
0Likes
Like

Posted 16 November 2013 - 08:49 AM

Yeah, I sometimes do write down basic class/function relations on paper, too. But often its changing fast and you could never write down all of it even for a single time.

I wish there was a tool you could feed a whole source tree in, which would then automagically generate a nice, easily customizable diagram of all classes, member and global variables, methods, functions, including different lines for inheritance, calls and bad use of public variable read/write. That is, it should go exactly backwards from the commonly told way of sinking much time into creating an UML diagram (which seem to get too coarse grained to be useful and dont include methods), then implementing it, then some changes get made and the diagram is useless.

What I saw from doxygen class diagrams feels not really useful enough to me, because I can just look at 1 to 3 header files and see the same.



#19 TheChubu   Crossbones+   -  Reputation: 3971

Like
3Likes
Like

Posted 16 November 2013 - 04:21 PM

AFAIK, warnexus is using Java. So, based from that...

 

Eclipse has plugins for handling version control for git (EGit), Mercurial (MercurialEclipse), and so on (Subversion, CVS, etc).

 

The things you need is a: A repository (it can be local but preferably in some website, BitBucket supports Git and Mercurial, GitHub supports Git only I think), and b: The plugin. Once you have both, you can follow some tutorial to set up your repository.

 

I use Mercurial, started to use it because I wanted to have my code somewhere so I don't have to copy it back and forth between my desktop/netbook. That's a big plus, besides that you get the opportunity of commenting each commit individually, having the whole history of each file you modify, and watching your progress in a handy commit history page :)


"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

 

My journals: dustArtemis ECS framework and Making a Terrain Generator


#20 warnexus   Prime Members   -  Reputation: 1397

Like
0Likes
Like

Posted 16 November 2013 - 09:13 PM

AFAIK, warnexus is using Java. So, based from that...

 

Eclipse has plugins for handling version control for git (EGit), Mercurial (MercurialEclipse), and so on (Subversion, CVS, etc).

 

The things you need is a: A repository (it can be local but preferably in some website, BitBucket supports Git and Mercurial, GitHub supports Git only I think), and b: The plugin. Once you have both, you can follow some tutorial to set up your repository.

 

I use Mercurial, started to use it because I wanted to have my code somewhere so I don't have to copy it back and forth between my desktop/netbook. That's a big plus, besides that you get the opportunity of commenting each commit individually, having the whole history of each file you modify, and watching your progress in a handy commit history page smile.png

Thanks for the info! rolleyes.gif Thumbs up!






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS