How to stay DRY? Do Not Repeat Yourself! [closed] - project-management

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I find that one of the most frustrating aspects to software development is finding a solution to a problem, forgetting it, then being faced with the same issue in the future only to forgot how you previously solved it. Or to write a useful bit of code, then on a later project not be able to find this code.
My general question is this: How do you keep track of all the new things you learn each day while programming? Does anyone have a systematic way to capture knowledge and easily and efficiently apply it in the future?
UPDATE: Thanks the for the responses, here's what you came up with:
Social
Stackoverflow
Tumblr
Twitter
Evernote
Blogs/Wikis
Code Repositories
Github
Unfuddle
LaunchPad
Google Code
Desktop
Dropbox
Yojimbo (mac)
VoodooPad (mac)
Wikidpad (win)
Surfulater

Stackoverflow is a good place to start :-)
Keeping a blog is another thing (here's mine).
Even Twitter can be useful for this.
There are also a number of "desktop wiki" applications that I find very useful: VoodooPad on the Mac and Wikidpad for Windows.
Finally, if you need to store snippets (or more) of code (that you have the rights to, of course), then there are plenty of source code repositories available now (GitHub, LaunchPad, Google Code or Unfuddle if you want complete control).

The brain has limits. Accept it.
The solution is to have tests for your code so you can merge repeated code without breaking a sweat as soon as you notice it.

I use TiddlyWiki to keep track of a lot of things. It's a one-page, self contained wiki that you can run off your desktop, or your server.
If you want a hosted solution, you can get one for free over at TiddlySpot

I'm having this problem myself too. I've just started couple months ago by adding good SO questions/answers into my favorites, even those I answered or posted. I guess that's a good start. :)

Write a blog. Publish your findings, code samples and everything else. The best way to save the knowledge for future.

I don't care too much when I forget how I solved some problem five years ago. Chances are that in the meantime, there is a better way to do it available. GIYF.

If it is for an organisation, having internal wiki page (or something similar) could help.
If it is only for you (and anyone that's interested), write a blog, favourite snippets on internet etc.
For code, a good approach (in both cases: organisation and yourself) is to keep something I call "Utilities Library". Each piece of code I like usually fits into one of the problem scopes / namespaces of the library. This way, over time, you have a neat code base that allows you to not to invent the weel again. Of course, after couple of months or years the library needs documentation to find anything in there :)

I think Evernote is one of the best resources for storing all kinds of notes. You can even upload photos of texts (say from your iphone, or just your computer), and the text will be OCR'd, so that you can free-text search for parts of the text later.

I use Yojimbo to keep track of just about every neat algorithm, code snippet, or handy idea.

A database of notes (I use an application called Surfulater) and a directory tree of source code (also kept in a Subversion repository).
If I were to start today, I'd probably use some Wiki framework to store my notes.

I always carry around all my interesting projects with me using dropbox. Then I usually know where to find the tricks I did before.
Everytime I see something good on SO I star it, everytime I see a good article on the web I bookmark it.
Keeping a blog or a tumblr is also nice.

I am used to carry my flash disk wherever I go. So, I have different folder there for C# notes, Asp.Net notes, Design Patterns etc.
And whenever I do something that I feel I can use it in the future, basically I open the relevant Word document in it, add the details and the code snippet with a header and save.
I do not know how the others do it but it really helps me.
Do not forget to add a reference index in the beginning of your document.
P.S : I also carry all the e-books in my disk. To have them all in my pocket gives me really good feeling.

I use google reader to store all the interesting blogs and I add notes on the issues it was about.For codes strangely I always forget after having solved the issue but now I either post on asp.net forum and stackoverflow. But only strange thing happened to me couple of years ago, I had an issue and I managed to research to solve it but when I reviewed some codes I had written 3 years before I saw that I had used the same function and identical code for a similar issue. I think even if I didn't remember the code, it must have been hidden somewhere in my mind :)

Related

What features do you miss most when switching from IntelliJ to XCode? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I've started to use XCode several months ago, after using IntelliJ for several years, and there are quite a few features that I really miss. XCode is not that bad, but it is lacking some basic stuff.
To trigger the discussion, here are some of the features that I miss most, who knows maybe someone from Apple will bump into this post and steal some Ideas :)
Source-level error-highlighting. The write-compile-fix cycle feels like going back in time 15 years ago to my early C days. Many errors can be spotted without having to compile and Java IDEs have been doing it for years.
A decent debugger. This is a bit unfair because IntelliJ's debugger is the best I've used so far, but XCode's debugger is at least 5 years behind and Apple has a few more developers than JetBrains...
Stronger re-factoring. A no-brainer I guess. XCode has some renaming capabilities (which they call re-factoring), but they are very few.
Override method. This one is really amazing. XCode doesn't have an "override method" command which lets you choose the method you want to override from a super class or protocol. You need to go to the documentation or header file and start copy-pasting.
Duplicate selected line(s). I've bumped into some posts that offer workarounds for this via custom key-binding, but none of them works, at least for me.
Go to last edit point. Bummer! Come on Apple, this one is so easy to implement and so useful!
A better open quickly feature. IntelliJ's quick find of classes/files/text is so much better...
Turns out that my list goes on and on, so I'll stop here...
What other features do you miss most in your transition to XCode??
Ori
As for the better Open Quickly feature - Code Pilot for Xcode might help here :)
http://macoscope.net/en/mac/codepilot/
Maybe we soon will get all those features. According to an interview in JavaPosse #283, Jetbrains is working on an IDE for Objective-C :)
Intentions are a great tool in IntelliJ. They quickly help identify things I might have otherwise missed. The new Build and Analyze feature in XCode 3.2 is a good start in the right direction.
And they just announced IntelliJ is now available via Open Source. I hope this means we start seeing more adoption, perhaps more plugins to make it more useful for Mac/iPhone development.
+1 on all your points. But I'd also like to have better local revision tracking (Actually this is from eclipse, rather than IntelliJ, but still). I usually realise I should have taken a snapshot of the code after I've made a mess.

Tools and best practices to understand somebody else's code [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
Sometimes one needs to dig into someone else's code, understand it and maybe refactor/fix it. So I'm wondering what tools/practices do you use to do that? It's not about any specific language or platform, rather some advises in general.
I myself find it very useful to run the code in question under debugger (if it is possible of course), set breakpoints and step through the code.
Also I've used a few UML tools with reverse engineering features to see the big picture. Visualization works pretty well for me.
There's one tool, that I've used quite a bit: Understand. It's not a UML tool, but it has a bunch of visualizations for the code. For instance control flow diagram for a function, which is not part of UML, but sometimes it's very useful.
I've heard that sometimes people write tests for the code they want to learn, but it hasn't been working for me. Sometimes the code I want to understand is not very testable.
There are other tools, like profilers, dependency checkers, loggers etc. Does anybody use it with any success? And how?
What the first thing use start with? What's the next?
I have been in this situation before... It's not much fun. The best way I've found is to write unit-tests to cover the areas that are going to change. Even if tests already exist, this gives you experience with both the api and behavior of the code you intend to refactor. Additionally, you gain more tests to verify the replacement implementation.
Typically, I divide these kinds of requests into 2 camps:
Fix the bug, not the whole code. In this case, I'd tend to read the code and see if I can easily put in the fix without making major significant changes, e.g. adding 5 lines of code or less. This is where the changes made are like a surgical strike that does minimal impact to achieve the desired result.
Tear down the code and put up much better stuff. In this case, there isn't a good little way to do the change or there are lots of little changes that want to get bundled up into a mini-project where digesting all the code is needed and this isn't a quick minor change. Taking an ASP site and putting it into the latest .Net framework would be an example here.
Determining which kind of change something is requires a bit of practice and experience understanding what someone else may call, "One more thing if you could..." that may be a huge deal but they don't see it that way,e.g. could we add a little module that records any error and sends me an e-mail when something bad happens that may not be so easy after all the other requirements get worked out like what if the code can't send a mail message what should it do.
Do check out nWire. It is an Eclipse plugin, currently for Java & PHP, which analyzes your code and offers code exploration, visualization and search tools. The tool is about understanding the associations in your code: class hierarchies, invocations, instantiations and pretty much everything else.
I find it very useful for digging into piles of code (BTW, for me, even my own code becomes alienated after a couple of months of not touching it).
Are you looking for high-level structure, like modules, namespaces, and class design? Or are you trying to understand the internals of the classes, e.g. how specific lines of code work? Those are two different kinds of analysis tools.
Sort of platform specific, but ReSharper is great for teasing out the hidden meaning of .NET code. I love the "Find Usages Advanced" feature where you can look for sets, gets, implementations etc...

which open source project is most like Google Notebook? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
As we knew, Google stopped the development of Google Notebook. Though lots of alternatives exist, no one satisfies me (see below for the reasons). Many suggest Google to open source it, but Google didn't response by so far. So I'd like to turn to open source world to develop one. In a nutshell, Google Notebook attracts me in the following ways:
Every notes of a certain notebook present in the form of "list" intuitively. Notes can be dragged to rearrange and organized into Sections, meanwhile notes and sections can be collapsed and expanded easily. To the best of my knowledge, no other note taking software or web service functions like that.
Need to begin a new note? Just move the mouse cursor to any "blank strip" between two notes and click--a new note will emerge there, waiting for your edition, or you can change it into Section freely. No need for the stupid "New Note" button or anything of the kind, and you can always make your new note in the exact place you want. That's the best part that Google Notebook offers, and that I'd like to seek for in the world of existed open source projects.
Well, these are the most valuable things I'd like to have in my new note taking software. Please tell me which open source projects I should learn for, whether web-based (e.g. PHP projects) or executable software (cross-platform is better) will be OK. Thanks very much.
Closest thing I've found was WorkFlowy. Dividing things into categories is not as straightforward (you need to create "subnotes"), but otherwise the interface and the features are similar (although I still prefer Google Notebook's).
Will give OneNote a try as well. If the OneNote webapp is any good, I might end up going in that direction.
the tomboy project guys are developing a django-based web client with and additional api for desktop-sync. it looks interesting. check it out:
http://live.gnome.org/Snowy
http://automorphic.blogspot.com/2009/05/tomboy-0151-release-brings-new-online.html
http://mindby.com/2009/05/tomboy-snowy-nirvana/
Well, there's Chandler. My first thought when I saw Google Notebook was that Chandler had better get its ass in gear...
I have been using Zim-Wiki for along time, really liked it. Will evaluate chandler. Actually we all read articles takes notes, and wish a smiple but powerful desktop wiki or notebook.
Zim-wiki doesnot start a page by clinking over a empty space, as its not ajax based. Anyways here's a set of tools i use to keep my notes.
Zim-Wiki, for something i read, and wish to add my perspective for late reference.
Bokmark, the links for later reference
BScrapBook feature in firefox, or scrapbook+ feature of firefox3.5
I have not found a one-solution product as of now. I hope someone provides a better integrated product.
Zim is extra-simple, usual keyboard shortcuts and intuitive layout , thus hardly any learning cure. It is cross platform, and i share my same common notebook across my windows and linux.
It's not open source, but Microsoft OneNote is pretty stellar in my opinion. It's pretty similar to Notebook(click to start a new note, tags, searching across all notebooks, etc..) and it's easy to move your notebooks around if you have OneNote installed on more than one machine. I've used a handful of others and none of them have been as intuitive and easy to use.
Not open source, but Evernote has an API. I haven't seen any other app with so many modes of getting notes to their system (cell phone with camera integration, web, desktop app). Everything can synchronize. If you have the desktop app installed, it has command-line capability.
There is a tagging system similar to Stackoverflow. All the different notebooks, drag-and-drop arrangements are in the desktop version.
I actually started using fishCode Library.Net and I really like it. I sync it to Live Mesh so database nodes are always in sync.
I just moved from Google Notebook to Google Documents. I essentially just use it as a log book creating an entry for each day with a few lines of details. Works fine for me so far.
I created a webapplication called jottinx to replace Google Notebook for me. It is not open source, but it is free to use. I looked at the alternatives, and frankly found none to be really to my liking. Honestly it still is very much a work in progress, so I do not yet have the drag/drop/collapsing notes, but I am working on that.
You can import your Google Notebook Atom xml files, and work from there again.
For the moment it is a simple clean application, and I use markdown to write your notes, which I personally prefer as I tend to keep also code snippets and scripts in my notes.
As this is still in progress, I am always keen to receive feedback ...

How do you store all the things which you've learnt and information you want to keep? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
Granted knowledge is best retained when put into practice, but as programmers I'm sure there's just too much information. Besides annotating your books, what other methods do you use for your own personal knowledge-base so you can have an easily accessible reference?
Do you create your own wiki or use software like wikidpad, or save them as plain text, bookmarks, pdf, web pages etc..? Or do you just treat google/SO as your giant knowledge-base and search only when required?
You may find this similar
https://stackoverflow.com/questions/10961/have-you-used-a-wiki-in-your-project-or-group, and of course this question can easily relate to non programmers as well.
Blog about it. That way you'll always have it no matter where you are, and that information gets shared with others.
I use Tiddlywiki to keep all of my development notes together, other than notes or handouts that I might get at a meeting that I want to keep. Those go into a folder for the particular project and I add a reference to them in my Tiddlywiki so that they don't get lost in the shuffle. I tag everything with a limited set of tags (rather than going overboard with the tagging, I have a set of 15 tags that cover the projects and categories I need) so I can get back to them quickly.
Works for me.
Otherwise, I blog about them as needed, use drive indexing for massive searching across lots of stuff, and keep a short daily summary of activities (1 or 2 lines) for better recall.
There are several solutions that I have seen people use successfully:
blog about it (as others have noted here)
maintain a Wiki (local or hosted)
keep it in a plain text file
use Backpack
use a hosted office solution (Google docs, Zoho)
email it to yourself in Gmail (yes, really :) well, makes stuff easily search able)
I personally use a TiddlyWiki (easy to use; very good search) which I carry around in a USB pen drive and which is also checked in to my SVN repository; and a small "notebook" (created from here) which fits neatly in a wallet, to jot down things when I am not near a computer.
Start a wiki.
ScrewTurn is what I use.
I've been storing my notes in Google Documents(google.com/docs). I've tried wikis but the cost of setup and maintenance hasn't been justified yet. I may need to look further into this option as my set of notes get larger.
Another thing to consider is ye olde programmer's physical notebook. Paper and pencil should never been underestimated in this digital age.
As far as personal Wiki software goes, I've been a big fan of VoodooPad for OSX. It's a nice self contained Wiki applications. No need to maintain a web server or have your Wiki hosted anywhere but your computer. Plus you can export into a variety of formats. It's very inuitive to use and can store just about anything you want.
It should also preserve syntax coloring if you were to extract a code sample (I don't have it in front of me so I cannot confirm).
I like Treepad for organizing notes. It's based around a tree structure, and each node can contain a text document, and have child nodes.
It's not particular designed for programming, but it's very easy to use.
org-mode for Emacs. I use it for planning work (short- and long-term), TODO items, random how-to notes (with clicky links to source files and URLs) — All in one single flat file. It has unicorns!
I use codekeep to store my code snippets
Occasionaly I store a few notes on google notes too
Mostly in a plain text on a flash drive, which is in the key ring along with keys from home. Plus eventually backups on the web site. This makes it available on any platform and in any place, wherever I go. There's still places without internet access you know.

Is help file (or user manual) dead? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
Back in the days of Unix, you couldn't even close a software without reading the man page first. Then came Mac and Windows with consistent menu layout and keyboard shortcuts, but you still saw paper user manuals shipped in the shrinkwrap box, which described each and every single operation possible in the app. After the Internet, help files became html documents.
Nowadays with Web 2.0 applications, you hardly see the Help. Even if it's there, they simply describe some specific tasks. In other words, the apps are relying more on the common sense or don't-make-me-think factor of the user base.
Years ago Microsoft came up with a concept called Inductive User Interface, which basically tells programmers to put in instructions on the apps itself, but I am not sure how popular that idea is.
Are help files, user manuals, and context sensitive online help with F1 key dead? Have I failed if user could not find out what to do from the UI? If not, what degree of help should I provide? (both for desktop and web app)
EDIT: How does documentation/help file mesh with agile development methods? For example, should the developers think twice before UI changes that may obsolete a bunch of screenshots?
Three notes on help:
F1 / stand-alone context-sensitive help was always doomed. It was hidden by default, and so the people who most needed it were least likely to read it. There was hope at one time that we would be able to train users to always hit F1 when they ran into trouble, but too many applications without useful context-sensitive help... combined with too many bizarre help interfaces... pretty much killed this.
Manuals are as important now as they ever were. Not so many printed manuals anymore, but online manuals are better than ever. The proliferation of wiki-as-a-manual systems has helped here, reducing the up-front cost of creating good online documentation. Of course, plenty of people just don't read...
The beauty of using web pages as an application interface is that you can combine useful context-sensitive help with the UI, removing the barrier for novices and others who otherwise couldn't be bothered to look for relevant information when they get stuck.
Of course, there are still plenty of apps, even online apps, designed with obtuse interfaces and a tiny little help icon in a corner somewhere, presumably hoping that the latter mitigates the former. Pity them.
No way. You look at the amount of documentation and training and marketing expenditure even MS puts up.. you'll get your answer.
Try using someone else's product, and you will learn the true value of documentation - I'm learning Godiagrams right now.. :)
So I can say without a doubt.. NO and it never will.. no matter how intuitive user interfaces get.. beyond a certain size, you will need help and training. But by understanding the user and what he needs to get done, you could design it such that the time he/she needs to learn the system to do his/her routine tasks is minimal.
Have I failed if user could not find out what to do from the UI?
If not, what degree of help should I provide? (both for desktop and web app)
They should be able to use your your app to do basic things from the UI. eg say for an image editor, they should be able to create a new image, and draw some lines then save it just by looking at the UI.
This is best done by following common layouts (like having new, open and save under file in the menubar, and using the standard open and save dialogs).
The same goes for webapps, people exspect to be able to do the basic stuff without having to read the docs, but for more advanced features people will still read the docs. (eg most pople will read the docs for say BB code, or markdown at least sometimes, but they expect to be able to post without having to know them)
Are help files, user manuals, and context sensitive online help with F1 key dead?
They still have their place. People will use them to learn about how to best use various features, for example markdown or bbcode, or how to use filters to get certain effects in an image editor.
I've been incorporating context-sensitive screencasts into my applications. I've found this helps non-technical users grasp the application quickly, without asking for live help.
The Idiot/Dummy books must be doing quite well. Imagine if the standard application help was as good as those books. The standard F1 help for a lot of apps is just awful.
Is help dead? No, but some of it should be taken out and shot.

Resources