Knowledge can be thought of as a Pyramid of Information, like the predator-prey biological pyramid or energy distribution in an ecosystem.
Building the Knowledge Pyramid is like a "Fox and Hounds Paper Chase" so that the Walk-The-Long-Road on the Information Trail/Path becomes much easier.
First need to categorize learning resources into 3 levels:
1) Top-Down: Solution Space - What problems does this technology address and solve?
2) Middle-Up/Down: Module level concepts like Manager code e.g. Virtual Filesystem Cache Manager, Storage Manager
3) Bottom-Up:
Search for Short-Intros materials like ppts, podcasts, pdfs, research papers, articles, blogs, videos, mindmaps, TOC
Find the Gurus in the trade and their JourneyMan followers
Subscribe to RSS Feeds to blogs by them
1) JourneyMen in the domain like Yeshawant Kanetkar who explain things well to Apprentices (WalkInThePark Pattern)
2) MasterCraftsMen in the domain like Stroustrup, Richter, Butenhof (WalkInTheForest Pattern)
0) Blogs, articles or PPTs doing a system walk-through relating how various things and flows through the system
like "Gusatvo Duartes blogs on Operating Systems"
1) General books to get a feel for the domain and common constraints, solutions, patterns and principles
like "Operating System Principles", "Distributed Systems: Principles and Paradigms"
2) Applied Books using APIs, Frameworks
like"Linux System Programming", "Windows Application Programming by Richter"
3) System/Sub-System Level books describing internals of APIs, Frameworks
like "Understanding the Linux Kernel", "MFC Internals"
Categorizing Method Applied to Information Trail:
Follow most referred book/white-paper trail in collections like Bibliographies, Appendices, References etc.
This method works on any of the above 3 levels,
Example:
Get generic Distributed domain book from amazon and follow Up/Down to higher/lower levels of Pyramid.
"Distributed Systems: Principles and Paradigms" -> "C++ Network Programming" ->
a) POSA2 (Basic Distributed Patterns)-> POSA3 (Resource Mgmt Patterns) - (Design Level Classics)
b) Operating System -> "Operating System Principles" by Galvin -> "Understanding theLinux Kernel" by Bovet and Cesati
c) Module Level Concepts -> Caching Virtual FileSystems, Remoting Patterns -> Research Papers -> Classic Books referring to the Research Papers
d) Networking -> "Programming the Sockets API" by Stevens -> ... -> "Linux Network Internals" (Implementation Level Classics)
On a Related Note:
A Concept Map can very nicely simulate such a Tree of knowledge.
Hmmm.... kind of like the way WikiMindMap hierarchically orgranises a Wikipedia article into a tree structure. So we can do the following to convert a wiki/webpage into a concept map:
1) Use WikiMindMap to convert wikipedia article into a Freemind MindMap and export it as a .mm file
2) Use XMind to convert the .mm file into an XMind Concept Map which is shareable and editable with friends.
Saturday, October 30, 2010
Howto Learn in Small Chunks - (Bite Sized Learning)
Many of the curious and interested people always end up saying at one time or another....
"I've really wanted to learn more BUT I can't seem to find the time for it...."
What happens to our time, after all as someone said "God gave each one of us 24 hours".
So how is that some people seem to make so much more use of them than others?
Apart from the solid block of time allocated for our salary-paying masters what's left of them?
Waiting in queues for doctors, meetings to start, buses to show up.... these are the places we lose our free-time 24 hours.
a) The main problem is these time-chunks are fragmented i.e. the free chunks occur in-between major tasks. We need some method to connect these small fragments together
b) Mostly these free-time chunks are too small to do any significant work.
c) Sometimes we cannot predict when we'll get these free minutes/hours. So we tend to browse stuff and use up these fragments of time.
But there is a way that we can make full use of these time-chunks if we learn how to
a) Learn in small chunks by finding bite-sized activities.
b) Actively Record-What-You-Learn so that you can continue where you left off last time. This way the task switching overhead is minimized as you save your work every few minutes - kinda like saving that important file so you don't lose all your work when the computer hangs.
1) Subscribe to RSS Feeds to blogs by Gurus in the trade and their followers (WalkInThePark, WalkInTheForest Patterns)
2) Browse constantly using a phone/iPad to browse the net on idle time-chunks like waiting for the bus, doctor, queue etc.
3) Keep a book handy for power-cuts, reading on bus etc. (Make sure that it's small enough and has big letters for easy reading). StudyTheClassics to avoid wasting time on useless stuff. Amazon ratings may not be the best guide at all times. A classic is normally referenced by many books even the time-waste ones. Utilize the bibliography at the end of most books.
4) Learn Research-Techniques like Skimming, SpeedReading, Mindmapping on a book for quick outline of the book to be added in the book review.
5) Capture the essence of what you understood by taking notes a book for quick reference later.
Use the book fully -
1) Annotate the TOC with educated guesses and already known-facts gathered from Short-Intros. Peek into topics which you can't explain well to yourself or to refresh/cross-check your memory.
2) Categorize the bibliography into ShortIntros, Mid-Stuff, Adv-Stuff to build up your Knowledge Pyramid
3) Keep incrementing your blog on the topic with all resources - links, notes, thoughts, questions.
4) Keep Reviewing your blog to reduce/add TODOs:
correct grammatical mistakes,
add further links for later annotation,
cleanup and reorganize information,
re-view the gathered information with a fresh eye,
simplify, clarify, generalize, specify, elaborate, concise information,
split of a huge post into different blog posts
(each post should not be more than 2 PageDowns for the reader)
5) IMPORTANT: Blog should not be a place where information goes to die but a place where it comes alive.
With each review and update it should spawn a new generation of Rise-From-The-Ashes-Phoenixes.
6) You'll be surprised to see how much you can achieve in small bites spread across time.
See Also:
How to Read A Book And Why (from bookshelved wiki)
"I've really wanted to learn more BUT I can't seem to find the time for it...."
What happens to our time, after all as someone said "God gave each one of us 24 hours".
So how is that some people seem to make so much more use of them than others?
Apart from the solid block of time allocated for our salary-paying masters what's left of them?
Waiting in queues for doctors, meetings to start, buses to show up.... these are the places we lose our free-time 24 hours.
a) The main problem is these time-chunks are fragmented i.e. the free chunks occur in-between major tasks. We need some method to connect these small fragments together
b) Mostly these free-time chunks are too small to do any significant work.
c) Sometimes we cannot predict when we'll get these free minutes/hours. So we tend to browse stuff and use up these fragments of time.
But there is a way that we can make full use of these time-chunks if we learn how to
a) Learn in small chunks by finding bite-sized activities.
b) Actively Record-What-You-Learn so that you can continue where you left off last time. This way the task switching overhead is minimized as you save your work every few minutes - kinda like saving that important file so you don't lose all your work when the computer hangs.
1) Subscribe to RSS Feeds to blogs by Gurus in the trade and their followers (WalkInThePark, WalkInTheForest Patterns)
2) Browse constantly using a phone/iPad to browse the net on idle time-chunks like waiting for the bus, doctor, queue etc.
3) Keep a book handy for power-cuts, reading on bus etc. (Make sure that it's small enough and has big letters for easy reading). StudyTheClassics to avoid wasting time on useless stuff. Amazon ratings may not be the best guide at all times. A classic is normally referenced by many books even the time-waste ones. Utilize the bibliography at the end of most books.
4) Learn Research-Techniques like Skimming, SpeedReading, Mindmapping on a book for quick outline of the book to be added in the book review.
5) Capture the essence of what you understood by taking notes a book for quick reference later.
Use the book fully -
1) Annotate the TOC with educated guesses and already known-facts gathered from Short-Intros. Peek into topics which you can't explain well to yourself or to refresh/cross-check your memory.
2) Categorize the bibliography into ShortIntros, Mid-Stuff, Adv-Stuff to build up your Knowledge Pyramid
3) Keep incrementing your blog on the topic with all resources - links, notes, thoughts, questions.
4) Keep Reviewing your blog to reduce/add TODOs:
correct grammatical mistakes,
add further links for later annotation,
cleanup and reorganize information,
re-view the gathered information with a fresh eye,
simplify, clarify, generalize, specify, elaborate, concise information,
split of a huge post into different blog posts
(each post should not be more than 2 PageDowns for the reader)
5) IMPORTANT: Blog should not be a place where information goes to die but a place where it comes alive.
With each review and update it should spawn a new generation of Rise-From-The-Ashes-Phoenixes.
6) You'll be surprised to see how much you can achieve in small bites spread across time.
See Also:
How to Read A Book And Why (from bookshelved wiki)
Useful Sections of a Syntopic Learning Post
0) Add a TODO section at the top for quickly scanning pending actions on the blog
1) Build the Knowledge Pyramid one link at a time.
2) Add Short-Intros: ppts, podcasts, pdfs, research papers, articles, blogs, videos, mindmaps, TOC, tutorials, sample-code, howtos,
3) Add Mid-Stuff: guides, idioms, best-practises, FAQs, Gotchas, traps-and-pitfalls
4) Add Adv-Stuff: Design-level stuff, Patterns etc.
1) Build the Knowledge Pyramid one link at a time.
2) Add Short-Intros: ppts, podcasts, pdfs, research papers, articles, blogs, videos, mindmaps, TOC, tutorials, sample-code, howtos,
3) Add Mid-Stuff: guides, idioms, best-practises, FAQs, Gotchas, traps-and-pitfalls
4) Add Adv-Stuff: Design-level stuff, Patterns etc.
Thursday, October 28, 2010
Howto Capture Your Ideas and Knowledge into a MindMap using Freemind
For some time now I’ve been using Freemind tool to make mindmaps to capture ideas and knowledge.
I was pretty happy with Freemind the opensource and free mind mapping tool.
It has some great features including exporting the mindmap into different formats - html, browsable java-applet, picture formats, flash file, pdf etc.
What I'm really trying to do is to use and leverage my blog by adding browsable mind-maps.
I've been somewhat successful in finding resources but still failing to get the last-mile work done.
Once I do this I'll be able to use mind-maps for sharing with others and allow them to edit my work too. Seems like the best bet right now is to move to wordpress plugin below:
1) There is a Free Mind Viewer plugin for Wordpress which allows read-only browsing of your mindmap file (not just an image). I’ve not been able to try it out yet though.
2) XMind converts a Freemind mindmap into a concept map. You can then upload and share it using a free XMind account. Paid accounts also allow collaboration.
3) WikiMindMap converts any Wikipedia article into a mindmap for reading it visually.(Thanks to dorai's log for this info)
4) DeliciousMind = Delicious (bookmarking) + Freemind
blainekendall.com - DeliciousMind = del.icio.us + FreeMind mindmap
https://api.del.icio.us/v1/posts/recent?count=10000
See Also:
Freemind Mindmap Embedded In Wordpress - Web Development Jobs - oDesk
WordPress › Freemind Viewer « WordPress Plugins
FreeMind Google Module/Gadget: (Requires you to have your own blog hosting)
Freemind Viewer Google Module – Rolando Garza
Dissecting the Freemind Viewer – Rolando Garza
yuriy.org: FreeMind Flash Browser Google Gadget
placingafreemindmindmapusingobjectelements - rolandog02
Embedding mind maps - FreeMind - free mind mapping software
Freemind | drupal.org
Extension:FreeMind - MediaWiki
Freemind Collaboration on Windows - FreeMind - free mind mapping software
Freemind:
Main Page - FreeMind - free mind mapping software
Download - FreeMind - free mind mapping software
Using FreeMind - FreeMind FAQ
Tutorial effort - FreeMind - free mind mapping software
Import and export - FreeMind - free mind mapping software
Accessories - FreeMind - free mind mapping software
FreeMind 0.9.0 The New Features
FreeMind 0.8.0 Features
FreeMind FAQ
After the Applet Start - FreeMind FAQ
Essays - FreeMind - free mind mapping software
Stuff - FreeMind - free mind mapping software
Mindmapping: Articles on general mindmapping concept and uses
internet mind reader - Improves your thinking with free mind map and brainstorming software
Mindmapping, concept mapping and information organisation software
Freemind combined with blogging
[Note: This is a Work-in-Progress so subscribe to RSS feed for updates]
Wednesday, October 27, 2010
Howto do Reverse Debugging with GDB
Webinar on Reverse Debugging with DSF-GDB
This webinar introduces the new DSF-GDB debugger integration that is part of CDT 6.0. It illustrates the recent GDB additions such as Reverse debugging, Multi-Process and Non-stop multi-thread debugging.
GDB Reverse Debugging Wiki
GDB and Reverse Debugging
Presentation (PDF) on Internals of GDB Reverse Debug and Process Record Target
GDB Reverse Debugging Tutorial
This webinar introduces the new DSF-GDB debugger integration that is part of CDT 6.0. It illustrates the recent GDB additions such as Reverse debugging, Multi-Process and Non-stop multi-thread debugging.
GDB Reverse Debugging Wiki
GDB and Reverse Debugging
Presentation (PDF) on Internals of GDB Reverse Debug and Process Record Target
GDB Reverse Debugging Tutorial
Tuesday, October 26, 2010
Under The Hood Look At Shared and Static Libraries, Linkers and Loaders
Linker Loader :
Link order of libraries ,
Link options for gcc ld,
Yolinux Tutorial on Static, Shared Dynamic and Loadable Linux Libraries,
Shared Library How-to,
How-to write Shared Libraries by Ulrich Drepper (Redhat),
Cross Platform Shared Library How-to ,
Program Library How-to,
Linkers and Loaders online downloadable book
Link order of libraries ,
Link options for gcc ld,
Yolinux Tutorial on Static, Shared Dynamic and Loadable Linux Libraries,
Shared Library How-to,
How-to write Shared Libraries by Ulrich Drepper (Redhat),
Cross Platform Shared Library How-to ,
Program Library How-to,
Linkers and Loaders online downloadable book
Howto Look Inside Executables, Libraries and Object Files
Learning Python - Collection of Resources and Links
Beginner:
BeginnersGuide
BeginnersGuide/Download
BeginnersGuide/Overview
HowToEditPythonCode
BeginnersGuide/NonProgrammers
BeginnersGuide/Programmers
How do I Run a Program Under Windows
PythonEditors
BeginnersGuide/Programmers (Cpp2Python.pdf)
Good Presentation by a C guy on Python features
Blogs:
Dorai's blog post on Learning Python
CookBooks:
BeginnersGuide/Programmers/SimpleExamples
Python Snippets and Recipes
Python by Example
Common programming tasks in Python
Pythonic File Searches
Using Pythonic Idioms and Style:
Definition of "Pythonic" here
Presentations:
How to Write Pythonic" code by Christopher Arndt
Presentation on "Code Like a Pythonista: Idiomatic Python" by David Goodger
Presentation on "Code Like a Pythonista: Idiomatic Python" (Crunchy Remix) by Jeff Hinrich
How to produce slides like above using Python tools
Style Guide for Python Code
My blog on Exploring the Python standard library source code
Books:
IntroductoryBooks
Python books
How to think like a computer scientist with Python
Bruce Eckel's community contributed book: Python 3 - Patterns & Idioms
Version Issues:
Python2orPython3
What's New in Python 3.0
What's New in Python 2.6
What's New in Python 2.7
Moving from Python 2 to Python3 (PDF)
Porting Code to Python 3 with
2to3
Case Study: Porting
chardet
to Python 3Learning Resources:
Installing Python
MultiMedia:
Video on "Head First into Python 3"
5-minute videos on Python Capability
ShowMeDo Screencast of Python 2.5 Development on XP
Audio/Visual Talks on Python
Introduction to Computer Science and Programming (videos from MIT course)
Podcast Python411
Python3:
"What an IronPython user should know about Python 3"
Python 3 focused version of Dive Into Python
Teaching programming with Python 3
Python 3.1:
Setup
Documentation
Python2.x:
Python Tutorial
Dive Into Python
A Byte of Python
Instant Python
Download Thinking in Python (Old) by Bruce Eckel here
Python for Java programmers
Moving to Python From Other Languages
Python is not Java
MovingToPythonFromPerl
Practice Problems for Python
Reference:
Official Python website
Python Wiki
Python 2.7 FAQ
Python 2.7 Windows FAQ
Python Quick Reference
Python Language Reference manual
Python's Standard Library Reference manual
Module Index of the Python docs
Python's reply to Perl's CPAN: Python Package Index (PYPI)
Extending and Embedding the Python Interpreter
Python/C API Reference Manual
See Also:
Eric S. Raymond article on moving to Python: 'Why Python?"
MediaPacker - Utility to help pack your DVDs and CDs to the brim
Media Packer is meant to solve the following problems.
1) Allow good-fit packing of DVDs, CDs with given set of directories/files.
2) Intention is to semi-automate (i.e. provide suggestions to users) or fully automate the process of packing backup media such as DVD, CDs.
3) To be developed in Python for portability and ease-of-extension
InProgress:
1) Display media space occupied by a folder structure (files and directories).
File Size code snippet,
>>> import os
>>> b= os.path.getsize("/path/isa_005.mp3")
>>> b
File I/O tutorial
>>> f = open( 'test.txt', 'at')
>>> f.writelines( str(b))
>>> f.close()
>>> f = open( 'test.txt', 'rt' )
>>> s = f.readlines()
>>> sDirectory Size Lister (Check out the comments at end of blog to get info on )
1) Allow good-fit packing of DVDs, CDs with given set of directories/files.
2) Intention is to semi-automate (i.e. provide suggestions to users) or fully automate the process of packing backup media such as DVD, CDs.
3) To be developed in Python for portability and ease-of-extension
InProgress:
1) Display media space occupied by a folder structure (files and directories).
File Size code snippet,
>>> import os
>>> b= os.path.getsize("/path/isa_005.mp3")
>>> b
File I/O tutorial
>>> f = open( 'test.txt', 'at')
>>> f.writelines( str(b))
>>> f.close()
>>> f = open( 'test.txt', 'rt' )
>>> s = f.readlines()
>>> sDirectory Size Lister (Check out the comments at end of blog to get info on )
Pydirstat. pydirstat is a really handy cross-platform, command-line way to generate information about disk usage. http://developer.berlios.de/projects/pydirstat/
Future features:
1) Add catalog and search facility to uniquely identify each media, add tags for folders/files and user comments.
2) Allow collaboration and sharing of catalogs among friends to share useful files.
3) Possibly use bit-torrent protocol for the sharing??
To be released under GPL.
See Also:
MediaPacker sourceforge account
Future features:
1) Add catalog and search facility to uniquely identify each media, add tags for folders/files and user comments.
2) Allow collaboration and sharing of catalogs among friends to share useful files.
3) Possibly use bit-torrent protocol for the sharing??
To be released under GPL.
See Also:
MediaPacker sourceforge account
StarUml is dead (NOT)!! Long Live the Stars!!
Star UML a very nice stable open-source design tool was suspected to be dead.
The tool is downloaded quite heavily, but development seems to have been abandoned as of 2005 with a stable release version 5.0.
But hey!! Just-a-minute, StarUML seems to have been rebooted as of (2010-July-19).
Originally written in Delphi, looks like its being converted to an eclipse plug-in in java.
Don't know how long it'll take to do the conversion though.
Seems like there are two(?) developers working on it right now.
Best of Luck to you.
Anybody with experience in Eclipse plugins and Java wanna help?!!!
http://sourceforge.net/news/?group_id=152825
The tool is downloaded quite heavily, but development seems to have been abandoned as of 2005 with a stable release version 5.0.
But hey!! Just-a-minute, StarUML seems to have been rebooted as of (2010-July-19).
Originally written in Delphi, looks like its being converted to an eclipse plug-in in java.
Don't know how long it'll take to do the conversion though.
Seems like there are two(?) developers working on it right now.
Best of Luck to you.
Anybody with experience in Eclipse plugins and Java wanna help?!!!
http://sourceforge.net/news/?group_id=152825
Monday, October 25, 2010
Delta Debugging
References:
Download Delta from delta.tigris.org
Why Programs Fail has won a Software Development Jolt Productivity Award!
Eclipse Plug-Ins - Software Engineering Chair (Prof. Zeller) - Saarland University
DDchange - DDchangeWiki
Delta Debugging article on Wikipedia
Delta Debugging articles by Andreas Zeller
See Also:
Episode 101: Podcast with Andreas Zeller on Debugging | Software Engineering Radio
Video by Andreas Zeller on Debugging the Debugging activities
Video YouTube - Learning from Code History
Mining Software Archives by Andreas Zeller
About Andreas Zeller - S/W Engg. Chair at Saarland University
Publications by Prof. Andreas Zeller
Download Delta from delta.tigris.org
Why Programs Fail has won a Software Development Jolt Productivity Award!
Eclipse Plug-Ins - Software Engineering Chair (Prof. Zeller) - Saarland University
DDchange - DDchangeWiki
Delta Debugging article on Wikipedia
Delta Debugging articles by Andreas Zeller
See Also:
Episode 101: Podcast with Andreas Zeller on Debugging | Software Engineering Radio
Video by Andreas Zeller on Debugging the Debugging activities
Video YouTube - Learning from Code History
Mining Software Archives by Andreas Zeller
About Andreas Zeller - S/W Engg. Chair at Saarland University
Publications by Prof. Andreas Zeller
Adv Debugging - My Program Worked Yesterday, but Not Today (WYNOT) by Andreas Zellar
Brief Notes of my understanding of on Delta Debugging as discussed in “Worked Yesterday, NOt Today" by Andreas Zeller
Note: To understand the basic premise and constraints/approaches of Delta-Debugging referred to the pdf link to:
Context: Looking through the CVS history we find that N changes have been added since Yesterday.
Alternative: Normally we would need run the debugger to reproduce the failure and then try to collect information which induces it. But this requires a programmer to interactively query the program state using a debugger.
Can the debugging be automated without needing the programmer?
Strategy: Delta Debugging using a test-case to reproduce the failure.
Data Method:
Using the Scientific Method we can first try to reduce the Input Data in a binary search mechanism to isolate the minimum data which causes the failure.
Code Method:
a) Group related changes - changes on common date/file/variable are more likely to be related. Group them into a single unit to avoid dependency across units.
b) Prune configurations when they're obvious dead-ends e.g. Where change dependency is chained all the way (Today) 10->9->8->7->6->5->4->3->2->1 (Yesterday)
c) Exclude changed code which is never executed.
See Also:
Pdf: "WYNOT - Worked Yesterday, NOt Today"
Andreas Zeller
Podcast on Software Engineering Radio
Delta Debugging
Note: To understand the basic premise and constraints/approaches of Delta-Debugging referred to the pdf link to:
- Analyse the tables/graphs carefully. (80% of the understanding comes from the example tables/graphs)
- Connect the WYNOT talk with Andreas Zellar's podcast on Software Engineering Radio.
Context: Looking through the CVS history we find that N changes have been added since Yesterday.
Alternative: Normally we would need run the debugger to reproduce the failure and then try to collect information which induces it. But this requires a programmer to interactively query the program state using a debugger.
Can the debugging be automated without needing the programmer?
Strategy: Delta Debugging using a test-case to reproduce the failure.
Data Method:
Using the Scientific Method we can first try to reduce the Input Data in a binary search mechanism to isolate the minimum data which causes the failure.
Code Method:
- Simple Method: When failure is caused by a single change. We can try to isolate the change which causes the failure by doing a binary search through the change history. If there are N changes between Y(esterday) and T(oday) we test 'k/2'th change where 1 <= k <= N. We go on partitioning until we find a failure-free change. The latest failing change is the culprit. Complexity of this binary search is O (log N)
- Complex Method: When failure is caused by a combination of changes. Unfortunately it's Not always possible to use the Simple Method in the case when combination of changes cause the failure. In such a situation we need to identify at least 2 (or more) changes which together cause the failure.
- Divide the change history into N changes
- Group N changes into say 4 units i.e. N = N/4 * 4
- Generate combinations with different units.
- Test combinations for the failure.
- Prune any units which don't participate in the failure at all.
- Recursive above steps by sub-dividing the units above (quarters into octets and so on) until we finally we end up with minimal changes that reproduce the failure.
a) Group related changes - changes on common date/file/variable are more likely to be related. Group them into a single unit to avoid dependency across units.
b) Prune configurations when they're obvious dead-ends e.g. Where change dependency is chained all the way (Today) 10->9->8->7->6->5->4->3->2->1 (Yesterday)
c) Exclude changed code which is never executed.
See Also:
Pdf: "WYNOT - Worked Yesterday, NOt Today"
Andreas Zeller
Podcast on Software Engineering Radio
Delta Debugging
Saturday, October 23, 2010
Debugging with GDB's Cheat-Sheet of Commonly Used Options
Gdb:
Compiling a program for debugging:
g++ -ggdb -O0 hello.cpp #
g++ -g3 -O0 hello.cpp # -g3 compiles debugging info for preprocessor macros and no optimization
Running a program under the debugger without arguments
$> gdb myProgram
Setting the program arguments:
a) $> gdb --args myProgram 10 20 30 40
b) (gdb) start 10 20 30 40 # sets temporary breakpoint at main() and calls run.
c) (gdb) file myProgram
(gdb) run 10 20 30 40
d) (gdb) set args 10 20 30 40
(gdb) show args
(gdb) run
e) $> gdb myProgram core
f) $> gdb -tui myProgram core # start vim/emacs ide for debug session
Compiling a program for debugging:
g++ -ggdb -O0 hello.cpp #
g++ -g3 -O0 hello.cpp # -g3 compiles debugging info for preprocessor macros and no optimization
Running a program under the debugger without arguments
$> gdb myProgram
Setting the program arguments:
a) $> gdb --args myProgram 10 20 30 40
b) (gdb) start 10 20 30 40 # sets temporary breakpoint at main() and calls run.
c) (gdb) file myProgram
(gdb) run 10 20 30 40
d) (gdb) set args 10 20 30 40
(gdb) show args
(gdb) run
e) $> gdb myProgram core
f) $> gdb -tui myProgram core # start vim/emacs ide for debug session
Tuesday, October 19, 2010
Howto Debug a Core-Dump/Crash-Dump for a stripped binary from a production machine
Core dump Analysis:
Core Dump (Wikipedia)
Memory dump (Wikipedia)
CallStack (Wikipedia),
Enabling core dumps in embedded systems,
Dr Dobbs - Postmortem Debugging
Dr Dobbs - Post-Mortem Debugging Revisited
Stackoverflow article (with comments) on core dump analysis on Solaris,
Backtrace commands in GDB documentation
Howto generate a Backtrace for Bug Reporting by Testers (from Gentoo doc)
Stack buffer overflow (Wikipedia)
Segmentation fault (SIG_SEGV, SIG_BUS)
A FAQ: User contributed answers regarding the definition of a segmentation fault,
A "null pointer" explained,
Answer to: NULL is guaranteed to be 0, but the null pointer is not?
Resolving crashes and segmentation faults,
What is the difference between a segmentation fault and a stack overflow?
Windows:
Crash dump analysis website
Books:
Debugging: The Nine Indispensable Rules for Finding Even the Most Elusive Software and Hardware Problems (by David J. Agans)
Software Exorcism: A Handbook for Debugging and Optimizing Legacy Code (by Bill Blunden)
Debugging by Thinking : A Multidisciplinary Approach (by Robert C. Metzger)
Memory Dump Analysis Anthology, Volume 1 (by Dmitry Vostokov)
core(5)
– (Linux Programmer's Manual – File Formats)Core Dump (Wikipedia)
Memory dump (Wikipedia)
CallStack (Wikipedia),
Enabling core dumps in embedded systems,
Dr Dobbs - Postmortem Debugging
Dr Dobbs - Post-Mortem Debugging Revisited
Stackoverflow article (with comments) on core dump analysis on Solaris,
Backtrace commands in GDB documentation
Howto generate a Backtrace for Bug Reporting by Testers (from Gentoo doc)
Stack buffer overflow (Wikipedia)
Segmentation fault (SIG_SEGV, SIG_BUS)
A FAQ: User contributed answers regarding the definition of a segmentation fault,
A "null pointer" explained,
Answer to: NULL is guaranteed to be 0, but the null pointer is not?
Resolving crashes and segmentation faults,
What is the difference between a segmentation fault and a stack overflow?
Windows:
Crash dump analysis website
Books:
Debugging: The Nine Indispensable Rules for Finding Even the Most Elusive Software and Hardware Problems (by David J. Agans)
Software Exorcism: A Handbook for Debugging and Optimizing Legacy Code (by Bill Blunden)
Debugging by Thinking : A Multidisciplinary Approach (by Robert C. Metzger)
Memory Dump Analysis Anthology, Volume 1 (by Dmitry Vostokov)
Tuesday, October 12, 2010
Steps towards Technical Mastery
How do you know if you've become a Master in your field?
Is there any method to learn things quickly in any field?
How do you avoid stagnation and mediocrity after becoming competent in your field?
How do you become a Master?
Take software for example: How do you become a Master in it?
These are exactly the questions which have been pushing me to seek answers.
Well now that I've got some kind of grip on this quest I'm able to give some of the answers.
Or at the very least point the way.
Short Answer: You'll know it when you get there!!
Long Answer: You'll see the Sign-Posts as you move towards achieving Mastery. Read on for the gory details.
Is there any method to learn things quickly in any field?
How do you avoid stagnation and mediocrity after becoming competent in your field?
How do you become a Master?
Take software for example: How do you become a Master in it?
These are exactly the questions which have been pushing me to seek answers.
Well now that I've got some kind of grip on this quest I'm able to give some of the answers.
Or at the very least point the way.
Short Answer: You'll know it when you get there!!
Long Answer: You'll see the Sign-Posts as you move towards achieving Mastery. Read on for the gory details.
Thursday, October 7, 2010
Basic Template with Ingredients for a Technical Blog
A good Technical Blog Post follows the Law Of Retention: repetition helps Retention
Some Questions on your Blog Post:
Some Questions on your Blog Post:
- Is your blog a frequently used resource for yourself and your readers?
- Does it grow as you learn more - addressing different levels of questions?
- Is it short and informative while being complete and self-contained?
Is your blog addressing The Readers Perspective?
- What's in it for a Reader?
- Tell 'em what you're going to Tell 'em.
- Tell 'em.
- Tell 'em what you just told 'em.
- Further info.
Wednesday, October 6, 2010
Understand Source Code by Reading Code and Refactoring for Maintaining Large Projects
This list consists of one-liner tips to be used for easy lookup and reference.
Rewriting Code for Better Understanding (Coding Horror)
Rewriting Code for Better Understanding (Coding Horror)
- What I cannot create, I do not understand. [Richard Feynman]
- "What I do not create, I do not understand."[Chris]
- "It's easier to understand 600 tables than 100,000 lines of code." [PaulC on comp.databases.theory/2005]
- Create a new project with blocks of code copied from old code. Refactor to reduce "old code smell"
- Start refactoring by adding small tests to better understand code and act as regression tests.
- Just scan through huge amounts of code till it starts making sense - "understand by constant exposure".
- Create a text file to capture your understanding - briefly describe how the component works, realtions to other components, what it persists, its states, and source browsing/debugging tips you found useful.
- Manually reformat a copy of the code - white space, and indented as per your personal style.
- Working Effectively with Legacy Code
- Object Oriented Reengineering Patterns
- Refactoring: Improving the Design of Existing Code
Labels:
books,
code-reading,
coding-horror,
collection,
comments,
how-to,
maintainance,
projects,
refactoring,
software,
source-code,
stackoverflow,
strategies,
techniques,
tips,
understanding
Howto Start a Blog, Get Useful Blogging Ideas, Add Good Content, Reduce Effort with Tools and Keep Blogging
- Avoid Bloggers-Block:
- After the initial burst you can't think of what to say - so the blog languishes.
- A blog is short form for web-log i.e. a kind of "A log entry in your Personal Diary".
- It is not meant to be a book which you publish after many many rewrites and deep thought.
- Some people even have one-liners or even other peoples blogs as blog-entries.
- Your idea becomes self sustaining if it's useful or matters to you or your friends.
- You can organise your self-learning or teaching notes as blogs. Collect questions from people around you or from forum newbies. This way you create more knowledge for yourself and write excellent blog-posts that are useful to others.
- Publish or Perish:
- Publish as soon as you have a line of text on your blogs.
- Drafts are the best way to kill blogs.
- Use them only when you require to do some basic tidying before posting.
- Even this can be done later followed by a republish.
- Blog Incrementally:
- Paste your current state into the blog (like saving a session of your mind a.k.a. brain-dump).
- Every time some find some new useful information you just paste that into your blog-post.
- Use a multiple clips clipboard manager to copy all the info you need.
- The post should be written in logical manner with least gaps in the reasoning or steps
- Any good links that you open in Firefox tabs can be saved for:
- a) Further investigation
- b) Future use
- Reduce Blogging Effort:
- Ideally follow 80-20% rule.
- Spend 80% time spent on gathering material.
- Spend 20% time spent on filling in gaps and reordering/rewriting post.
- See Tools section for more details
- Tools:
- Currently I'm trying to reduce editing/formatting effort/time by using the following tools:
- Blog Upload: Evaluating desktop client s/w's for editing and posting to blog (like ScribeFire, Windows Live Writer, SeMagic)
- I've used 2-3 good desktop blogging clients:
1) ScribeFire to handle blog-editing, upload and managing of multiple accounts/blogs. - Looks to be the best option for now.
2) Kompozer is good for a basic HTML whysiwyg editor. - 3) Windows Live Writer - not really used it but looks good enough for basic blog maintainence.
- Blog Composing: Kompozer, CSS Stylesheets (TODO)
- MindMaps: XMind with Freemind (for mindmaps and concept maps with collaboration respectively)
- Pictures: Paintbrush Digicam for Photos, MediaWiki Free Photos
- Video: InstantDemo, Jing ScreenCapture software for Demonstration Videos.
- Diagrams: Diagramming s/w (To-Do)
- Uploading: To-Do
- See Also:Basic Format for a Technical Blog
Tuesday, October 5, 2010
Howto Improve your Blog's design
Accessibility: Does the title grab the attention of your intended audience?
- Does the title have keywords used by the audience while searching google?
- Does google index your blog regularly?
- Push your blog updates to blog broadcastors like weblogs.com
- Does your blog load up fast? Use the "Jump/Read More" feature and Optimize load time.
Retention: Is it easy for a casual browser to remember your blog and info you pain-stakingly put in?
Subscribe to:
Posts (Atom)