Relating milliampere-hours to watt-hours for batteries

Question: I've seen many batteries that are measured in milliampere hours (mAh), while others are measured in watt hours (wh). How can I convert them between each other so that I can actually compare them? It's often the case that computers or smartphones use one or the other and would be great to have a metric.
Answer: To the best of my knowledge, wattage is just the product of voltage x amperage. So if you know the output voltage of the battery, you should be able to convert mA to w, and vice versa simply by multiplying or dividing, and taking the "milli" prefix into account. You can drop the "hour" variable since it is in both units. In equation form:
$$\text{mA}\times\text{V}\times 1000 = \text{W}$$
and
$$\frac{\text{W}}{\text{V}}\times \frac{1}{1000} = \text{mA}$$
Answer: To get an approximate result for energy, you need to multiply the charge in mAh by the voltage in volts. If you have a battery with specs 10V and 100mAh, you have the energy estimate of 1000mWh, or 1Wh, or 0.001kWh. However, this estimate is approximate, as voltage decreases in the course of discharge.


How to download files from the Web in the Android Browser?

Question: After trying for a long while to figure it out, I still cannot convince my Android browser to save the file from a web link. If the link is a picture, holding over it and pressing "Save As" saves the picture, not the file it links to. My Android device has no multitouch (is this required to tell to browser to download?), and simply clicking on a download link takes me nowhere. Can anyone help me?
Comment: wouldn't clicking on the image automatically bring up a prompt for downloading the file?
Comment: @user71767 in my experience you just need to click the link and it should download.  Could you give us an example web site of what you are trying to accomplish.
Comment: You said "saves the picture, not the file it links to" as if those were two separate actions.  But they seem to me to be two different ways of saying the same thing.  So perhaps you need to clarify your question.
Comment: Firefox cannot save the files too
Answer: Nowadays the built-in Android browser has been replaced by Chrome, which does this perfectly well.  You can long-press and save virtually any image or link, and even videos from a number of sites that couldn't be easily done on the desktop.
Answer below for older devices:
The Android browser by default can only download files that the Android system "recognizes" (i.e., there has to be a program registered to handle that file type).  It's a stupid restriction in my opinion, but you can install Download Crutch to overcome this limitation (it registers itself for every filetype).
If you're referring to images that link to something else and you want to save the something else, long-press on the image and choose "Save Link As" or similar.
Comment: not working in Firefox
Comment: "the built-in Android browser has been replaced by Chrome": just to check, Chrome is not available on vanilla AOSP build, is it?
Answer: Personally I usually just click the link of the file and it downloads.
As for the image: try long pressing but instead of choosing "Save As" look for "Copy link URL" or "Open in New Window" or something similar to those two menu options.  "Copy link URL" should copy the URL of the file to your clipboard, then you can paste that link in the address bar and hit "Go" and it should download your file.  "Open in New Window" should essentially do the same thing (i'm just trying to give you as many options as I can to try). If you click on the link it may not take you anywhere but to a blank page while the file downloads.
So to check your download list:
 You may have already tried this but to see if the file was downloaded you can open your browser, open the menu, then select "More", you should see "Downloads".  This is where your downloaded files list is.
Another way you could check is to look in the "downloads" folder on your sdcard (/sdcard/downloads/) using ES File Explorer or some other file explorer.
If this is not a solution let me know and give an example of what you are trying to accomplish and I'll try to figure it out.
Answer: I've struggled with this same issue, though in my case I wanted to save a Text file (.txt) that I had open in the Chrome browser on Android 4.4.x (Kit Kat). After reading this and other questions posted I realised that neither Chrome, the Google applications, nor the standard Android tools would allow me to simply save a Text file from a URL.
To save a Text file from a URL to the file storage on my Android device I used the File Explorer application ES File Explorer. Within ES File Explorer there's a Download Manager that allows you to download any file from a given URL to the file storage on your device.
Answer: What Android OS version are you running?  And what kind of file does the image link to?
On 2.3.4 the browser offers me "Save link" and "Save image" as two options when I click on an image that is a link (e.g. on the image link to the Main Page at http://en.wikipedia.org/wiki/Web_browser)
But in earlier versions of Android it was different.  E.g. in 1.5, I just see "Save image" and "View image", so there is no direct way in the default browser to save the web page which the image links to.
As Matthew notes, the file type can also matter.  On my 2.3.4 phone it asked me if I wanted to save a file for which there was no handler.  E.g. for an xml file it said "The content is not supported on the phone.  No application can be found to open this file.  Do you still want to download it?"
For earlier phones and some kinds of files you may need to install an app which can handle the file.  "Download Crutch" is no longer in the market, but there seem to be others that would be suitable.


Can graph databases be easily distributed?

Question: I have never worked with graph databases such as neo4j, I would like to know if they support easily replication and clustered distribution as well as key-values databases, or if there inherent structure makes it really difficult/ slow
Answer: even that the way to distribute data in graph databases is not that easy as in key-value stores, where the keys are distributed by ranges, there are techniques to distribute a graph.
InfiniteGraph (made by Objectivity) for instance is a highly distributed graph database. It uses a P2P technology to increase read and write performance by growing the hardware. It allows the user to cluster a certain part of the graph or a certain kind of information as its needed and to distribute it over some machines as its needed too.
As I heard this process of clustering/distribution will be eased for the user in release 3.0. A parallel query mechanism is also planned, that allows to run one query concurrently on the machines.
Answer: Graph databases are hard to distribute, especially if the database wasn't designed upfront as a distributed graph database.
Titan is a distributed, real-time, transactional graph database that was designed from the start to be distributed. Titan can use either Cassandra or HBase as its distributed data store, and it's capable of supporting tens of thousands of concurrent users interacting with a single massive-scale graph represented over a cluster of machines.
Titan is Apache 2.0 licensed, and it's the first native Blueprints implementation so it integrates with the entire TinkerPop stack, which is BSD.


Where can I find examples of good Mathematica programming practice?

Question: I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't encountered yet. Where (books, websites, etc.) do I look for examples of good (best?) practices of Mathematica programming?
Answer: Here's a collection of resources that I started on Mathgroup (a collection of Mathematica learning resources) and updated here at Stack Overflow. As this site is dedicated to Mathematica it makes more sense to maintain it here. This represents a huge amount of information; of course it's not exhaustive so feel free to improve it! Also, don't hesitate to share it and suggest other interesting links! Remember, you can always search the online Documentation Center of Mathematica, that is identical to the built-in help of the latest software version.
Links to more advanced aspects of the program that you can start to appreciate once you understand the basics are provided in separate answers (below) as this post became too large.

Tips and Tricks
Advanced evaluation, patterns and neat algorithms

Introduction

If you're just beginning try to have a look at these videos.
Mathematica Basics, Elementary Programming in Mathematica
Hands-on Start to Mathematica
Several introductory videos by Jon McLoone
and many other video introductions and tutorials from the official Wolfram website
An elementary introduction to the Wolfram language
Fast introduction for programmers
Is it necessary to have a prior computational background or is it possible to learn Mathematica as a first programming language?
What are the most common pitfalls awaiting new users?
How To-s: full solutions for particular tasks from the online documentation
Easy-to-understand animations explaining common Mathematica functions
Sal Mangano's videos for using pure functions, Part and patterns
Introductory videos of various applications of Mathematica
What is the best Mathematica tutorial for young people?

Basic advices for people new to Mathematica
Functional style
Avoid iterative programming using loops like For or Do, use instead functional programming functions Map, Scan, MapThread, Fold, FoldList, ... and pure functions. This makes the code cleaner and faster.

Functional Programming, Functional Programming: Quick Start
Pure functions
What does # mean in Mathematica?
Alternatives to procedural loops and iterating over lists in Mathematica
An example: Programming a numerical method in the functional style
How to understand the usage of Inner and Outer figuratively?

Transpose and dimensions

Something not easy to guess alone at the beginning: if you have x={1,2} and y={3,4},
doing Transpose[{x,y}] or {x,y}ESC tr ESC in the front end will produce {{1,3},{2,4}} (format compatible with ListPlot). This animation helps understand why.

You can also use the second argument of Transpose to reorder the indices of a multidimensional list.

Don't forget to regularly control the output of the lists you generate using Dimensions.

Get familiar with shorthand syntax (@, &, ##, /@, /., etc.)

Operator Input Forms
when is f@g not the same as f[g]?

Programming easily

Getting help: Execute ?Map for example for a short description of a function, or press F1 on a function name for more details and examples about it. You can solve many problems by adapting examples to your needs.

Auto-completion: Start typing the name of a function and (in Mathematica 9+) select from the pop-up auto-completion menu, or press Ctrl+k to get a list of functions which names start with what has already been entered. Once the name of the function is written completely press Ctrl+Shift+k (on Mac, Cmd+k) to get a list of its arguments.

Function templates: In Mathematica 9, after typing a function name, press Ctrl+Shift+k (on Mac, Cmd+Shift+k) and click on the desired form from the pop-up menu to insert a template with named placeholders for the arguments.

Other useful shortcuts are described in the post Using the Mathematica front-end efficiently for editing notebooks.

Use palettes in the Palettes menu especially when you're beginning.

In Mathematica 8, use the natural input capability of Wolfram Alpha, for example type "= graph 2 x + 1 between 0 and 3" without the quotes and see the command associated with the result.

Tutorials

An elementary introduction to the Wolfram language, by Stephen Wolfram
Fast introduction for programmers
Fundamentals of Mathematica Programming (by Richard Gaylord, great tutorial for an overview of the logic behind Mathematica: patterns)
Video tutorial also available
Introduction to Mathematica (by Thomas Hahn, another succinct overview of Mathematica)
Tutorial Collection by WRI (lots of extra documentation and examples, available as free PDFs, also available and up-to-date in Help > Virtual Book in Mathematica).
Programming Paradigms via Mathematica (A First Course)
Mathematica Tutorial: A New Resource for Developers
Wolfram's Mathematica 101
http://bmia.bmt.tue.nl/Software/Downloads/Campus/TrainingMathematicaEnglish.zip
http://bmia.bmt.tue.nl/Software/Mathematica/Tutorials/index.html
A problem centered approach
A beginner's guide to Mathematica
http://math.sduhsd.net/MathematiClub/tutorials.htm
http://www.austincc.edu/mmcguff/mathematica/
http://www.mtholyoke.edu/courses/hnichols/phys303/
http://www.apam.columbia.edu/courses/ap1601y/ (Introduction to Computational Mathematics and Physics)
http://ftp.physics.uwa.edu.au/pub/MATH2200/2012/Lectures/ (Applied Mathematics)
http://ftp.physics.uwa.edu.au/pub/MATH2200/2009/Lectures (path for some lectures in pdf)
http://en.wikibooks.org/wiki/Mathematica
http://www.cs.purdue.edu/homes/ayg/CS590C/www/mathematica/math.html (Basic tutorial)
https://stackoverflow.com/questions/4430998/mathematica-what-is-symbolic-programming  (What is symbolic programming)
https://sites.google.com/view/relaxmacro/applications (Mathematica Code to simulate the transition process of a wide range of continuous-time, deterministic, infinite horizon optimization models)
http://www.physics.umd.edu/enp/jjkelly (An introduction to Mathematica as well as some physics courses)
Do you know of any web-based university course that is entirely Mathematica based?
http://homepage.cem.itesm.mx/jose.luis.gomez/data/mathematica (Tutorials in Spanish)
Mathematica programming (some examples of the various programming paradigms that can be used in Mathematica)

FAQ

http://12000.org/my_notes/faq/mma_notes/MMA.htm  (FAQ)
https://stackoverflow.com/questions/tagged/mathematica?sort=faq&pagesize=15  (FAQ on Stack Overflow)
https://mathematica.stackexchange.com/questions?sort=faq (FAQ on this site)
http://library.wolfram.com/conferences/conference98/Lichtblau/SymbolicFAQ.nb (Symbolic FAQ)

Books

Stephen Wolfram's The Mathematica Book (online, version 5.2), available for free
Mathematica programming: an advanced introduction (online) by Leonid Shifrin, available for free
Tutorial Collection by WRI (lots of extra documentation and examples, available as free pdfs, also available and up-to-date in Help > Virtual Book in Mathematica).
Mathematica Cookbook by Sal Mangano (O'Reilly, 2010)
Mathematica in Action by Stan Wagon (Springer, 2010)
Mathematica: A Problem-Centered Approach by Roozbeh Hazrat (Springer, 2010)
Mathematica Navigator by Heikki Ruskeepaa (Academic Press, 2009)
The Mathematica GuideBooks (for Programming, Numerics, Graphics, Symbolics) by Michael Trott (Springer, 2004-2005)
An introduction to programming with Mathematica by Paul R. Wellin, Richard J. Gaylord and Samuel N. Kamin (Cambridge University Press, 2005); contains an example of Domain Specific Language (DSL) creation.
Mastering Mathematica by John W. Gray (Academic Press, 1997)
Programming in Mathematica by Roman Maeder (Addison-Wesley Professional, 1997)
Programming with Mathematica®: An Introduction by Paul Wellin (Cambridge University Press, 2013)
Power Programming With Mathematica: The Kernel, by David B. Wagner (Mcgraw-Hill, 1997), out of print but scanned copy available here.
http://blog.wolfram.com/2014/01/10/read-up-on-mathematica-in-many-subjects

Wolfram Websites
Learn

http://www.wolfram.com/broadcast/
http://www.wolfram.com/training/courses (Online video courses, most are free)
http://www.wolfram.com/training/special-event/ (Links to videos of past conferences)
Slides of seminars
http://www.youtube.com/user/WolframResearch
An elementary introduction to the Wolfram language
Fast introduction for programmers
Data drop quick reference

Examples

http://demonstrations.wolfram.com
How To-s
http://www.wolfram.com/mathematica/new-in-8
http://www.wolfram.com/mathematica/new-in-9
http://www.wolfram.com/mathematica/new-in-10/
http://www.wolfram.com/mathematica/new-in-11/
http://www.wolfram.com/training/special-event/new-in-mathematica-10/
A plot gallery for Mathematica 9
http://www.wolfram.com/language/

Resources

http://www.wolfram.com/mathematica/resources
http://library.wolfram.com/ (Great amount of resources here)
http://support.wolfram.com/kb/topic/mathematica (Knowledge base)
http://www.mathematica-journal.com
Help
Help > Virtual Book
http://www.wolfram.com/support/learn/
http://www.wolfram.com/books/
http://reference.wolfram.com

Blogs

http://community.wolfram.com
http://blog.wolfram.com
http://blog.wolframalpha.com
http://blog.stephenwolfram.com
http://twitter.com/#!/mathematicatip

Other related sites

http://www.mathematica25.com
SMP
http://blog.stephenwolfram.com/2013/06/there-was-a-time-before-mathematica
http://blog.stephenwolfram.com/data/uploads/2013/06/SMPHandbook.pdf
http://www.wolframalpha.com
Wolfram Science: the official site of Stephen Wolfram's New Kind of Science
NKS forum
Lecture notes from NKS summer schools
Programs from the notes
Demonstrations
http://computerbasedmath.org/
http://education.wolfram.com (Some interactive basic math courses, useful for curious young people)
http://www.wolfram.com/webresources.html  (other Mathematica related sites)

Virtual conferences

http://www.wolfram.com/events/virtual-conference/spring-2013
http://www.wolfram.com/events/virtual-conference/2012
http://www.wolfram.com/events/virtual-conference/2011

Mathematica one-liner competition

http://www.wolfram.com/events/techconf2010/competition.html
http://www.wolfram.com/events/technology-conference/2011/one-liners.html
http://www.wolfram.com/training/special-event/mathematica-experts-live-one-liner-competition-2012

Wolfram technology conferences

http://www.wolfram.com/events/technology-conference/2016

2015, http://www.wolfram.com/events/technology-conference/2015

2014, http://www.wolfram.com/events/technology-conference/2014

2013, http://www.wolfram.com/events/technology-conference/2013

2012, http://www.wolfram.com/events/technology-conference/2012

2011, http://www.wolfram.com/events/technology-conference/2011

2010, http://www.wolfram.com/events/techconf2010

2009, 2007, 2006, 2005, 2004, 2003, 2001, 1999, 1998, 1997, 1994, 1992

http://library.wolfram.com/infocenter/Conferences/
Comment: Apparently, this is the most edited post by a single person across all of the SE network. You've really done a remarkable job at maintaining it!
Comment: Thanks, maintaining this list is a good way also to keep track of interesting posts on this site that summarize well some aspects of Mathematica.
Comment: @becko it's not too hard - like downloading YouTube videos, there are various ways. On Mac Safari, I set the user-agent to iPad before going to the page, then Download Linked File: this gets the mp4 download link.   (No Flash for me!)
Comment: Is there a way to download the videos from wolfram.com/broadcast?
Comment: @cormullion Got any tricks that work on Windows? I usually download videos from Youtube using a little program called Free Youtube Download. But that doesn't work on wolfram.com/broadcast (except for a few videos at wolfram.com/broadcast that are actually hosted on Youtube).
Comment: @becko I'm not a Windows-er, but perhaps you could investigate switching useragent somehow - there's a tool for the Chrome browser (User Agent Switcher for Chrome) that might work...?
Comment: @cormullion Thanks! I found the option to change the user agent and it works!
Comment: Karl Unterkofler (https://homepages.fhv.at/ku/karl/mma.html) has collected a list of Mathematica timing benchmarks on various hardware platforms (Mac's + PC's). The list also shows an interesting history: from Mathematica version 2.2 up to 8.0.
Comment: In the introduction this link does not work:
Introductory videos of various applications of Mathematica
Comment: This link seems to be broken: http://math.georgiasouthern.edu/math/computer/ABGMATHs1.pdf (in section "Tutorials").
Comment: Ok, I've found another source for the doc and updated the list.
Answer: My original post above became too big so I'm splitting it into two posts. The tips and tricks section that I used to keep track of interesting new posts mostly on this site was big so here it is.
Note the tags at the end of each question on this site in order to read related questions.
I'm further dividing this post. See my third answer on Advanced evaluation, patterns, and neat algorithms below.
Tips and tricks
Top posts

What are the most common pitfalls awaiting new users?
Programming paradigm change
Can one identify the design patterns of Mathematica?
Mathematica style guide?
General strategies to write big code in Mathematica?
Granular versus terse coding
What is in your Mathematica Toolbag

General tricks

A New Mathematica Programming Style: Functional-Procedural Fusion
http://www.verbeia.com/mathematica/tips/Tricks.html (Ted Ersek's tricks)
http://library.wolfram.com/infocenter/MathSource/4557/ (Ted Ersek's tricks as notebooks)
http://szhorvat.net/pelican/pages/mathematica.html (Szabolcs' tricks)
http://www.verbeia.com/mathematica/tips/tips.html (Verbeia's tricks)
http://www.nhn.ou.edu/~morrison/Mathematica/ (Tip sheets)
As pointed out by Mr. Wizard, have a look at the available packages in your install directory for getting new ideas!
Tricks of the trade in the Mathematica Journal
How do I designate arguments in a nested map?
Levels: how do they work?
Why Mathematica chooses bracket for function arguments over parenthesis?
Why do Mathematica list indices start at 1?
Elegant operations on matrix rows and columns
http://reference.wolfram.com/mathematica/tutorial/LinearAlgebraMatrixAndTensorOperations.html

Tips for writing faster code

Performance tuning in Mathematica?
http://blog.wolfram.com/2011/12/07/10-tips-for-writing-fast-mathematica-code
Programming for speed
Benchmarking expressions (timeAvg function)
Measuring time complexity of a method
Profiling from Mathematica
http://www.dbaileyconsultancy.co.uk/m_performance/m_performance.html
http://library.wolfram.com/infocenter/Conferences/7005/ (Principles of efficient MM programs, tips for writing fast code)
http://library.wolfram.com/infocenter/Conferences/320/  (Generally Efficient Numerics Programming in Mathematica)
Writing Efficient Mathematica Code
Dispatch tables
Using Mathematica's Dispatch
Efficiently extracting an array subset given a separate array
How to speed up calculations with large number of replacement rules? (Experimental`OptimizeExpression)
Alternatives to procedural loops and iterating over lists in Mathematica
Are there any cases when For[] loops are reasonable?
Alternatives to While Loops?
Is Table the only functional way to construct nested loops in Mathematica?
How to transform Do loop to more efficient codes?
Replace For-loop with functional code
Equivalent Nested Loop Structure
"do ... while" loop equivalent in Mathematica
Evaluate while external command is being run
Use Internal`Bag as a linked list (see links in Data Structures paragraph below)

Reap and Sow

Collecting Expressions during Evaluation
Reap and Sow can be used with StepMonitor
SelectEquivalents (my personal favorite Mathematica function, basically it allows to define classes of equivalence and apply a function on the elements of each class, using Reap and Sow)
How would you do a PivotTable in Mathematica?
Reap and Sow can also be used for debugging, see for example how it's used in ShowIt
How to collect result continuously (interruptible calculation) when running parallel calculations?

Compile

How to compile effectively?
How well does Mathematica code exported to C compare to code directly written for C? (Note the function Experimental`OptimizeExpression)
Has this implementation of FDM touched the speed limit of Mathematica?
Note the instruction (<< CompiledFunctionTools`; StringFreeQ[CompilePrint[cf], "MainEvaluate"]) to quickly verify that a compiled function doesn't need calls to external functions, available as from v8.
http://reference.wolfram.com/mathematica/Compile/tutorial/Overview.html
http://library.wolfram.com/infocenter/Conferences/7968/ (Effective Use of the Mathematica Compiler and Code Generation)
What kinds of uses of SymbolicC (introduced in Mathematica 8) do you foresee? Are there any neat examples already?
List of compilable functions
Why is there a huge performance gap using Map with more than 100 List entries
Shaving the last 50 ms off NMinimize  (Advanced tricks for a very fast Nelder-Mead optimizer)
Minimization by Nelder-Mead
Using Apply inside Compile
Removing calls to MainEvalute when using inlined compiled closures
JIT compilation
Implementing a function which generalizes the merging step in merge sort
A fast, robust DropWhile
Retaining and reusing a one-to-one mapping from a sort
Is it possible to use Compile on a function with optional arguments?
Compiling more functions
How can I compile this function
Compiling more functions that don't call MainEvaluate
How to define a complicated function inside the body of Compile?
Does Mathematica have a "MATLAB Builder" equivalent?
http://reference.wolfram.com/mathematica/CCodeGenerator/tutorial/CodeGeneration.html
http://reference.wolfram.com/mathematica/CCodeGenerator/ref/LibraryGenerate.html
Third argument of Compile
CompiledFunctionCall vs. LibraryFunction
Compiling LinearSolve[] or creating a compilable procedural version of it

Using links to other languages

System interfaces and deployment
Faster alternatives for DayOfWeek (Java)
Working with Java hashmaps from Mathematica
WSTP
Convert C program using mathlink to WSTP
Handling error in WSTP program C/C++
A MathLink tutorial
Mathlink Mode article
LTemplate
How to simplify writing LibraryLink code?
Drawing Clifford Attractors in Mathematica
Minimal effort method for integrating C++ functions into Mathematica
Converting other C++ classes to MTensor in LibraryLink
How can I use shared libraries in LibraryLink code and ensure Mathematica will find them?
How to understand shared passing of a MTensor in LibraryLink?
Using Boost with CreateLibrary
Write C/C++ programs calling Mathematica functions
Example program for calling Mathematica from C
Returning multiple results from a LibraryLink function
Calling Mathematica from Visual Studio - example
Which Distributions can be Compiled using RandomVariate
Librarylink made easier to use with C++11
Calling Mathematica from Visual Studio - example
How to use C language functions in Mathematica?
Mathematica Functions from VBA
Linking FORTRAN with Librarylink
MATLink, link between Mathematica and Matlab
Is it possible to export the equations from Mathematica to MATLAB?
Calling IronPython code from Mathematica
JLink
JLink classes' reference
ExternalEvaluate for Python fails with Import::nopythonevals

Packed arrays

http://library.wolfram.com/infocenter/TechNotes/391/  (Packed Arrays)
What is a Mathematica packed array? (instruction for being warned when a packed array is unpacked)
Mathematica memory management for large arrays
Avoid mixing integers with real numbers in a list, which would unpack the list and slow computations. For example use 1. instead of 1 if you have to enter manually an entry in a list of reals.
Isn't it possible to Pack a SparseArray?

Debugging

A debug utility to print or extract intermediate data from a program (ShowIt, a useful variant of Print)
The clearest way to represent Mathematica's evaluation sequence
How do I evaluate only one step of an expression?
Is it possible to construct a fullform trace function
Debugging memory leaks
Profiling memory usage in Mathematica
Preventing Mathematica from eating up all your memory (not a bug but the info can be useful)
How to un-eat memory?
Using the Mathematica debugger, and other interesting possibilities
Debugging Mathematica Code
DebugTrace
What are the best practices / most common / idiomatic ways to report errors in Mathematica?
How to program a F::argx message?
How to abort on any message generated?
Best practices in error reporting
How to leave function unevaluated programmatically?
Setting up diagnostic error messages in large Mathematica projects, Debugging a $RecursionLimit error?
Dealing with errors and resuming the code after one
Interrupting package evaluation, handling error
Prepend Information to Warning Messages
Need help with exception handling
Error checking and trapping techniques with Throw and Catch
Exception/Error handling using returns codes
How do I get Mathematica to return a function call unevaluated?
Resource management in Mathematica
Wolfram Workbench has an integrated debugger and profiler. See here for posts about it on this site: https://mathematica.stackexchange.com/questions/tagged/workbench
Inspecting non-variable state from a breakpoint in Workbench
workbench: how to see values of global variables during debugging
Mathematica Debuggability
Automatically generating a dependency graph of an arbitrary Mathematica function?
Is there an analogue of the Variables command for general expressions?
Using Java log4j in Mathematica

Data Structures

Data structures and efficient algorithms, from Daniel Lichtblau
Kd-list, Kd-tree (applied to Gröbner bases)
Expr Bag
Internal`Bag inside Compile
Efficiently collecting results inside a compiled function
Most efficient way of splitting a file into length-prefixed blocks
Linked lists
Mathematica "linked lists" and performance
Merge-sort
Variant of the cutting-stock problem in Mathematica
The answer of Leonid is a reference on the topic: Can one identify the design patterns of Mathematica?
Searching linked lists that contain lists?
Efficient circular buffer?
Efficient priority queues?
BTree
Using Memoization with a Mutable Object
How to speed up Minimum Spanning Tree algorithm?
How to make Huffman coding by using tree representation
What is the fastest way to maintain a large set of expressions?
Generating an ordered list of pairs of elements from ordered lists

Objects

How to create strong types?
How to implement FittedModel like objects
How can one define a custom data object?
Struct equivalent in Mathematica?
Implementing a dictionary data structure
Is there HashTable structure in Wolfram Mathematica?
Is there a method to enumerate the keys/values of System`Utilities`HashTable
A usage example in the answer of Oleksandr R. or in the answer to the post
How can you give a Module a context and have its local variables and Modules belong to that context?
What's fastest way of defining 10^5 down values?
Return a Part by Reference? (For accessing hierarchical / structured data)
Once more on object orientation in Mathematica: does it have to be so hard?
Builder pattern for complex objects construction
How can I implement object oriented programming in Mathematica?
MTools, an open-source package for OOP from the author of this answer
OOP applied to manipulate
Question about designing a particular data structure
Code Readability and Object-Oriented Code
Polymorphism and the pattern-matcher
Inheritance in Mathematica using pattern matching on UpValues
How to implement the Observer design pattern?
http://www.objectica.net/Documentation6/guide/ReferenceGuide.html (non free, but still can give some inspiration)

Traversal of an expression

How to perform a depth-first preorder traversal of an expression?
How to perform a breadth-first traversal of an expression?
Determining all possible traversals of a tree
Uses for MapAll (//@)
myHold examples with MapAll (1,2)
Can a Trie be implemented efficiently?
Concatenate strings from different levels of list

Graphs

GraphUtilities
How to play with Facebook data inside Mathematica?

Optional Values

Functions with Options
What are the benefits of switching from Rule and /. to OptionsPattern[] and OptionValue in a large application?
How to avoid collision between optional arguments and options
Can a function be made to accept a variable amount of inputs?
Dealing with nested options
Evaluation of OptionValue[]
Custom functions by delegating options in a specific way and using core functions (withOptionConfiguration)
Specifying optional arguments with variables
Is there any way to define pure functions with optional arguments?
Is it possible to separately call the default value of a variable which isn't at the end of the sequence?
Why doesn't Mathematica use uniform criteria for validating Options?
How to check the validity of an option value
How to inherit options by scoping?
How to make a function with its own options as well as passing options to other functions
Using a held option
Writing functions with "Method" options (Interesting answer on parsing a grammar of options)

Accessing data in different ways

Cases[data,Colon[key,_]] vs. Cases[data,key:_] toward XPath, XQuery
Emulating R data frame getters with UpValues
Creating a R DataFrame like construct in Mathematica
How to achieve Set+Part like behaviour in custom Set function?
The gap between MapAt and ReplacePart for 2D data tables with headers
Data Table Manipulation in Mathematica
Data Table Manipulation in Mathematica: Step 2
How can a big table be treated as a database?
Path queries for tree-structured data
Splitting up delimited data in lists
Partitioning with varying partition size (dynamicPartition)
Splitting a list by specifying section headers
Accessing list elements by name

Association/Dataset

How to make use of Associations?
Normal // Association // Dataset workaround for some user query operators
Can't get Append to append a record (association) to a dataset
How can I save a Manipulate's control settings to a dataset?
V10's Operator Forms - what are they good for?
What is the natural way of using Dataset to get a FittedModel?
Dataset: get number of levels and elements
Is there a comprehensive list of functions with operator forms?
Converting structured data to a dataset
How can I add a column into a existing Dataset?
GroupBy several keys while keeping the Dataset as a Table (List of Associations)
Learning Resources for Data Science in the Wolfram Language (many usage examples of List/Association/Dataset)
SQL-like computation on Dataset: Aggregate function
Is there a faster way to Map an Association?
Difference between Association and Dispatch
Changing Values in an Association using Map (Answer on Immutability)
Filtering Query Nested Data (Dataset and Association)
Is there an idiomatic way to determine whether an `Association` is a subset of another?
Visualizing Type System Operations
Struggling to understand Query
Reshaping associations, generalization of GroupBy

Rules and replacement (the backbone of Mathematica, more advanced)

Where definitions are stored
What is the distinction between DownValues, UpValues, SubValues, and OwnValues?

Getting ideas from Lisp

Structure and interpretation of computer programs, Common Lisp The Language, On Lisp, Practical Common Lisp ...
repl.it has an online interpreter for Scheme with some examples.
Is there a Mathematica/Lisp link?
Other functional languages : Scala, Haskell, Erlang, Clojure, Caml, F#, Maude ...
FAQ on functional programming

Memoization/Caching

The answer of Leonid is a reference on the topic: Can one identify the design patterns of Mathematica?
What does the construct f[x_] := f[x] = ... mean?
Avoid repeated calls to Interpolation (Interesting answers and links about caching values and expressions)
Function that caches when it returns unevaluated
Why is there no PositionFunction in Mathematica?
Built-in Mathematica data: are they cached? how to speed up the loading?
Memoization with pure functions?

Undocumented features

What are some useful, undocumented Mathematica functions?
Documentation of the frequently-used functions in the context of Internal` and Compile`
Items known by CurrentValue
How can one find undocumented options or option values in Mathematica?
What is the complete list of valid Front End Tokens?
How do you convert a string containing a number in C scientific notation to a Mathematica number?
What is the complete list of valid FrontEnd Packet types?
How can I get the unchanged Box form of an arbitrary expression?
How can I manipulate TemporalData?
How to work with Experimental`NumericalFunction?
Full documentation for AppearanceElements
How to create internally optimized expression for computing with high WorkingPrecision?
What are all the named Mathematica styles?
How to create expanding summary boxes like the ones displayed for InterpolatingFunction, NearestFunction, etc.?
Incompatible Changes since Mathematica Version 7?
Monte Carlo integration with random numbers generated from a Gaussian distribution

IDEs and packages

How to install the Wolfram Workbench plugin into Eclipse Kepler or Neon?
Wolfram Workbench
Managing formatted usage messages in Wolfram Workbench
Creating cross-version compatible documentation with Workbench
Renaming projects in Wolfram Workbench
Recommended settings for git when using with Mathematica projects?
How to setup Team Development for a Mathematica project?
Open-source IntelliJ IDEA plugin to support Mathematica development
How to distribute Mathematica packages as paclets?
How to properly handle mutual imports of multiple packages?
What's the difference between these two ways of specifying dependent packages?
Second argument of BeginPackage with nested package loading
Creating Mathematica packages
What are recommended guidelines for developing packages?
How to unload automatically loaded packages?
How can I dynamically get a file whenever it is saved in Workbench?
How to work with Application Project files in Wolfram Workbench?
What is a "Paclet"?

Mathematica functions and environment

How to specify Mathematica as a programming language?
http://www.wolfram.com/mathematica/quick-revision-history.html
Where can I access documentation for old versions of Mathematica?
http://12000.org/my_notes/compare_mathematica/index.htm
How to get complete Documentation Center graph of guide pages?
Automated testing for compatibility with older Mathematica versions
Integrating notebooks to Mathematica's documentation center (Using Wolfram Workbench is easier for building a help but the answer is still interesting)
List of dangerous functions
What are all the named Mathematica styles?
How does Plot work?
How to implement the sample-point process like the built-ins of Mathematica?
How to examine the structure of Graphics objects
Symbolic derivatives are being calculated numerically
Embed Code Into Image
How does Mathematica calculate integrals?
Is it possible to define a new PlotTheme?
How to get grid lines at all (log) tick marks in Version 10?
How can I set up a versioning system within a notebook?
Is there a notebook autosave frequency configuration?
Are there suitable versioning systems for Mathematica notebooks?
How to find a specific error message?
The Joy of Tagging: Manipulating and Mining Notebooks in Mathematica
How to programmatically mark and then select a subset of input cells?
Programmatic formatting for Mathematica code - possible?
Syntax highlighting for your own functions
Customizing syntax highlighting for private cell styles
Special Mathematica Cell to work with R code
Is it possible to improve Mathematica's auto-completion feature?
Creating a notebook that has cells of a certain style password protected
Advanced typesetting
Resources for beautiful Mathematica Stylesheets
Some tutorials on formatting notebook for exporting to pdf
What options and settings can be used to create print quality typeset documents with Mathematica?
Adding a label to an expression result
How to fold output cells by default?
Automatic e-mail/text message when a calculation has finished?
Keep MathKernel Running In Background - Speed Up Execution Time
Simpler input for the new unit support
Quality of random numbers
Will Mathematica install and run on Raspberry Pi computer?
Scheduling Mathematica scripts to run from a command line
How to keep $FrontEnd options from resetting?
How do I add new menuitems to menus?
Mathematica color schemes for the colorblind
Is there an easy way to use Matteo Niccoli's perceptual color maps for 2D plots in Mathematica?
What's inside InterpolatingFunction[{{1., 4.}}, <>]?
Are there any tutorials on version 10 notebook templating and report generation? Are there missing docs?
Handling Kernel start. What is a full initialization stack and what place the Autoload has there?
Comment: Now this is really useful, big +1. The better we categorize all these resources, the more effective this page will be.
Comment: This could be the Table of Contents of *Mathematica*.SE.
Comment: This is such a fabulous resource, thank you for taking the time to compile it.
Comment: Hi, @faysou, I'd like to see "Data structures and efficient algorithms, from Daniel Lichtblau", but this resources is not available anymore. Do you have a copy?
Comment: @matheorem no I don't, unfortunately.
Comment: The Data Structures presentation is back online.
Answer: Third part of my collection of links, dedicated to advanced evaluation, pattern matching and neat algorithms (which is quite arbitrary but contains a lot of interesting Q&As in my opinion).
Advanced evaluation of expressions

Non standard evaluation allows to work on the symbols of an expression before they get evaluated.
Here's how I represent myself Mathematica's evaluation: consider a function/tree f[a,b]. Without any particular attribute for f the leafs/arguments will be evaluated before the parent f. With f having a HoldAll attribute you don't evaluate the leafs but go directly in the evaluation of f. a and b will be evaluated as soon as they are used in a function that doesn't hold again their evaluation. For example
f[a_,b_]:= a Hold[b];
f[2^2,2^2] (* returns 4 Hold[4] *)

SetAttributes[f, HoldAll];
f[2^2,2^2] (* returns 4 Hold[2^2] *)

You can also see with the above example that SetDelayed (:=) acts like a With, ie it can insert a value inside a held expression.
http://reference.wolfram.com/mathematica/tutorial/NonStandardEvaluation.html
Preventing evaluation of Mathematica expressions
Hold any argument
How can I hold UpValues but evaluate other expressions?
Symbolic computations with already assigned variables
How to pass a symbol name to a function with any of the Hold attributes?
Pure function with attributes of arbitrary number of arguments: Is it possible?
Mathematica Language Structure
Mathematica Internals: A Tutorial
The evaluation process
http://reference.wolfram.com/mathematica/tutorial/Evaluation.html
http://reference.wolfram.com/mathematica/tutorial/TheStandardEvaluationProcedure.html
List manipulation to build a functional expression
How does Mathematica determine that an evaluation should be terminated?
What are all the "magic" Symbols in the Mathematica language?
Some notes on internal implementation
The Internals of the Wolfram System
Algorithm used by IsomorphicGraphQ
What is the complete sequence of evaluations/transformations from submitting a cell to actual evaluation?
\$PreRead, \$Pre, \$Post, \$PrePrint
Robby Villegas, Working with Unevaluated Expressions (Advanced resource about the evaluation process)
Update a function avoiding infinite recursion (Villegas-Gayley technique)
Understanding Villegas-Gayley
What are the use cases for different scoping constructs?
A speed comparison between Module, Block and With  (Still, Module is what users use most of the time)
Enforcing correct variable bindings and avoiding renamings for conflicting variables in nested scoping constructs
What does Internal`InheritedBlock do?
How safe is the use of Block and Internal`InheritedBlock
What is the purpose of Internal`LocalizedBlock?
What are the scoping rules for function parameters shadowing System` symbols?
Constructing symbol definitions for With
Using With to scope over pure functions
Module variable scoping in Scheduled Tasks?
Enforcing correct variable bindings and avoiding renamings for conflicting variables in nested scoping constructs
StringReplace, ReplaceAll and Rule interact in a bizarre way
What are some advanced uses for Block?
How to set Block local variables by code?
Safely nesting RuleDelayed
Metaprogramming in Mathematica
Can one identify the design patterns of Mathematica?
Replacement inside held expression
Injecting a sequence of expressions into a held expression
Is it possible to replicate the "magic" of OptionPatterns[] with DynamicModule's local variables?
How does MakeBoxes handle an n-ary operator?
How to inject an evaluated expression into a held expression? (Trott-Strzebonski in-place evaluation trick, RuleCondition)
How to pass a list of arguments into HoldAll
Returning an unevaluated expression with values substituted in
Passing a joined list of symbols for Module or Block to treat as its own local symbols
Replacing parts of a held expression with held parts of another expression
Expression parsing examples
Converting StringJoin to StringForm inside Hold
How to write a function to remove comments from a .m source file preserving formatting such as line wrapping reasonably?
How to write a function-defining function which stores the function arguments in a stack?
Is there a Mathematica API for the functions.wolfram site?
Function that counts the number of arguments of other functions
Using MatchQ (or other means) to parse an expression using sums of COS or SIN correctly
Automatically generating a dependency graph of an arbitrary Mathematica function?
Programmatic formatting for Mathematica code - possible?
Functional style using lazy lists?
Tally repeated evaluation of function
File-backed lists/variables for handling large data (Lazy evaluation of streams)
Lazy lists of Tuples and Subsets
How to use pattern matching to assign values to Subscript[f,x_]?
Implementing a safe ValueQ that does not evaluate its argument
Convert an expression to a Function
Nested definition: How can I define a function with a passed-in expression?
How to avoid nested With[]?
Comparing LetL and Module efficiency
Do people actually use UpValues?
Upvalues, TagSet and UpSet, what's the difference, when should a use each?
How to implement dual numbers in Mathematica?
Make mathematica treat $e_i^2$ as numeric
How to differentiate formally?
Currying with Mathematica
Going full functional (Haskell style)
How to avoid returning a Null if there is no "else" condition in an If construct (Vanishing function)
SetAttributes[f,Flat]: Why the order dependence?
The Flat Attribute, Unevaluated and the Evaluation Process
Orderless pattern matching
Spelunking
What is the most convenient way to read definitions of in-memory symbols when we don't have the source files? (Spelunking tools)
How to see which arguments are passed into a function
How does Return work?
What can I use as the second argument to Return in my own functions?
FoldWhile and FoldWhileList
Tail call optimization in Mathematica?
What tools can help in realizing tail recursion?
Elegant manipulation of the variables list
How to name a variable with the value of another variable?
Block attributes of Equal
How to find the name of the current function?
Does pass-by-value affect the performance of function calls?
Comparing Mathematica expressions like diff
What is the fastest way to get a list of subexpressions and their positions?
Resource management in Mathematica
How to pass a list of arguments into HoldAll
Dynamic Programming with delayed evaluation
Multiplying expressions within a list of pure functions
Using Through to evaluate complex expressions
How to make a function like Set, but with a Block construct for the pattern names
Scoping in assigning a derivative
Getting a usable expression tree
Call Functions From File Without Modifying Context (Sandbox)
Functions vs. patterns
when is f@g not the same as f[g]?
When should I use Apply (or Function) and when @@ (or &)?
Constructing functions with variable number of output arguments
Alternative to overloading Set
What are the cool kids talking about when they use ##&[]?
How to avoid returning a Null if there is no "else" condition in an If construct
How to create symbols from strings and set values for them?
What's the difference between Inactive and HoldForm?
Is it possible to reference "self" from a pure function?
How can one manually change the rule ordering
Permanently extending the behaviour of functions (like decorators)

Pattern matching
A pattern is a way to quickly describe the structure of expressions and do computations on them, using /. or Cases for example.

Some examples
Much more elaborate: a Texas Hold'em package by Sal Mangano
Rules, pattern and functions, one of the chapter of Leonid Shifrin's book.
Demistifying rules
Where in the documentation can I find a list of function argument types?
How can I type-check the arguments of a Mathematica function?
Advice for Mathematica as Mathematician's Aid
Using ?NumericQ to Affect Order of Evaluation
Is it possible to use the LevenbergMarquardt algorithm for fitting a black-box residual function?
Convert boolean test function to pattern?
http://library.wolfram.com/infocenter/Conferences/6999/ (Inside the Mathematica pattern matcher)
Is there an open source implementation of Mathematica-the-language?  (Some interesting links to papers about pattern matching, 1,2,3,4)
MockMMA
Mathador
Mathematica as a normal programming language
Mathematica for Computer Scientists
Mathematica Destructuring (Mr. Wizard also gives many links to interesting answers illustrating the same point)
How to match a pattern with a pattern?
How to generally match, unify and merge patterns?
Pattern matching a pattern with patterns
Semantica, a package for using semantic patterns (f[(2 n_)] for example)
How do I perform string matching and replacements?
Working with string patterns
Counting the number of instances of one sub-string within a given string within a lower- and upper-bound gap of a second sub-string
Placement of Condition /; expressions
Using a PatternTest versus a Condition for pattern matching
Use of StringExpression as argument
Quick way to use conditioned patterns when defining multi-argument function?
Assessing argument type in set delayed function definitions
How to Combine Pattern Constraints and Default Values for Function Arguments
ForEach in Mathematica
Why does the name of a pattern affect the result of a transformation rule?
Conflict with variables in pure functions
How to match expressions with a repeating pattern
Is it possible to specify a context-sensitive, "depth-agnostic" rewrite rule?
Change variables in differential expressions
Transforming XML
Extract information from HTML using Mathematica
How to manipulate web pages on Mathematica?
Extract information from HTML using CSS selectors?
Replacements/Substitutions in Mathematica (\$Assumptions)
Position function not always returning an answer even with no apparent problems
How can I ensure that I am constructing patterns in the most efficient way possible?
How can I find these patterns' signatures?
replacement rules from a pattern and a matching expression
Position of a pattern-matched part of an expression
Select cases from a list (ReplaceList)
Patternmatching sets
Using patterns in pure functions
The difference between 0. and 0
"Strange" behavior of Rule
f[arg1, arg2,...,argN] vs. f[{arg1, arg2,...,argN}]
A function that accepts a pair or a list of pairs
Alternatives pattern in a function definition
How to distinguish between lists and values?
Vanishing patterns
Get a "step-by-step" evaluation in Mathematica
Interactively inspecting parts of an object
How to do Cases with multiple related patterns?
How to match a cyclically repeating sequence?
How to define a recursive pattern?
Convert recursive RegularExpression to StringExpression?
Pattern match for nested Association
How to enlarge Mathematica's knowledge about certain functions?
Calling Table with custom iterator

Neat algorithms

Mathematica Minecraft
How to create word clouds?
How can I use Mathematica's graph functions to cheat at Boggle?
Performance tuning for game solving (peg solitaire | senku)
Factorisation diagrams
Happy 2K prime question
Simulating Theatre puzzle
How can I generate this "domain coloring" plot?
Tiling a square
Generating visually pleasing circle packs
Circuit drawing in Mathematica
Detecting patterns of black and white stones on a 2D board
How to build a bvh (a motion capture file format) player in Mathematica?
How to draw Fractal images of iteration functions on the Riemann sphere?
Generating a Sierpinski carpet
Speeding up this fractal-generating code
Explain a Mathematica winning one-liner
How can this confetti code be improved to include shadows and gravity?
How to create animated snowfall?
xkcd-style graphs
xkcdConvert routines perform slower in Mathematica 9
http://blog.wolfram.com/2012/10/05/automating-xkcd-diagrams-transforming-serious-to-funny/
Sketch-type graphics with transparency and dashed hidden lines?
How to improve the performance of solutions to Project Euler (#39)?
How to find palindromic numbers (Project Euler #4)?
Image processing
Help find a bright object on Mars!
How can I find Waldo?
QR Code in shopping cart handle
Playing with Matrix falling code in Mathematica
Image segmentation and object separation in 3D using Mathematica
Artistic image vectorization
DumpsterDoofus's captivating generative art
How to express trigonometric equation in terms of of given trigonometric function?
How do I introduce a new variable in a trigonometric equation?
Checking if two trigonometric expressions are equal
Efficiently generating n-D Gaussian random fields
Distribution of random points in 3D space to simulate the Crab Nebula
How to improve this code for solving the "Mr.S and Mr.P" puzzle?
Efficient code for the Ten True Sentences puzzle
Mathematica Implementations of the Random Forest algorithm
Soft-Match String Comparison
Gram-Schmidt Process for Polynomials
How to determine the center and radius of a circle given some points in 3D?
Counting multiplications (complexity function)
Insert $+$, $-$, $\times$, $/$, $($, $)$ into $123456789$ to make it equal to $100$
Higher order SVD
How to check if a 2D point is in a polygon?
Find eigen energies of time-independent Schrödinger equation
Solving a time-dependent Schrödinger equation
Efficient backtracking with Mathematica
Determine frequency of oscillations
Alternative ways to implement a triangular recursion
Implementation of smoothing splines function
Position
Efficiently finding the positions of a large list of targets in another, even larger list
Looking for a way to insert multiple elements into multiple positions simultaneously in a list
Efficient way of identifying the indices of first occurrences
Duplicates
Deleting quasi-duplicates from large list efficiently
Delete duplicate elements from a list
Ordering function with recognition of duplicates
How to get list of duplicates when using DeleteDuplicates?
How to efficiently find positions of duplicates?
Removing elements from a list which appear in another list
Map/Thread
Scan vs. Map vs. Apply
Map a function across a list conditionally
Map-Thread-Through-Apply a list of functions onto a list of (lists of) values
Thread over list in different levels
Thread over a nested list top to bottom until non-list elements are found
How can I make threading more flexible?
How to make MapAt work with Span?
Flatten
"Unflattening" a list
Transpose uneven lists
List manipulations
Finding a subsequence in a list
How to select minimal subsets?
Optimising 2D binning code
Efficiently extracting an array subset given a separate array
Quick multiple selections from a list
How to Derive Tuples Without Replacement
Need help coding/creating a recursive list (FoldList)
Find subsequences of consecutive integers inside a list
Instruct a Table to only evaluate until a condition is fulfilled
How do I replace a missing value in a column with the value immediately above throughout a table?
Sort+Union on a list
How to generalize and speed up this program?
How do I obtain an intersection of two or more list of lists conditioned on the first element of each sub-list?
Vlookup function as Excel in Mathematica
Partitioning a list of numbers the Mathematica way
How to pick increasing numbers from the list
How to replace an element in a list based on the value of the next element?
How to partition a list in a specific way
Nest , Fold ... is there an extension for more than 2 arguments?
List comprehension in Mathematica (similar to Python)
Select a repeated element in a list
Fast method for combining two lists
Discrete Convolution
Shuffle product of two lists
Is there a function which instantly tells you whether an element is part of a list?
Sort data after specific ordering (ascending/descending) in multiple columns
Total by a criteria
Comment: Thanks. It's good that this technique is now systematically represented here, I think it is an important one. I have added [this one](http://mathematica.stackexchange.com/questions/4343/automatically-generating-a-dependency-graph-of-an-arbitrary-mathematica-function/4345#4345), and my answer for the code formatter question (since in a sense formatter is also an expression parser, and in fact a pretty sophisticated one), which are the only ones that comes to mind right now.
Comment: I find the most difficult part of Mathematica is controlling evaluation (because there isn't just a single way to do it), and I think it's very important for the future of Mathematica, where macros (or code for rewriting code) is the horizon.  The post above is extremely valuable.
Comment: That's incredible! Thanks for keeping up a great work, this is very useful for all of us, much appreciated.
Comment: @Leonid I've collected some of your answers where you use a parsing approach, if there are other such posts could you please add them to the list ?
Comment: You're welcome, you're the hero of many of these posts.
Answer: I highly recommend examining the included packages under your Mathematica installation directory:

\AddOns\ExtraPackages
\AddOns\LegacyPackages
\AddOns\Packages
\AddOns\Applications

You can also find examples of good practice, framework guidelines, and insider methods in the presentations from various Mathematica conferences.  A mere sampling:
1999 Mathematica Developer Conference
2003 Mathematica Developer Conference
2007 Wolfram Technology Conference
Many, many more.
Answer: Besides the documentation, which I find very helpful, I also like the following resources:

The Wolfram Demonstrations Project is a fantastic resource, where you can draw up previously successful programs and learn some best practices. Their utility has varied, but I've certainly learned a lot by seeing great code in practice.
In a similar vein, I also follow the 'Wolfram Blog'. It's not all universally relevant for my own interests, but following it on Twitter is a good way to dip in here and there.
Finally, as a new user, I also draw on the Mathematica Cookbook for some nifty examples.

As noted above, however, I normally use the documentation and look through examples of uses, as that's my best way of learning.
Comment: +1 for the cookbook but I agree with @Nasser on the readability of the demonstrations (plus, doing everything in one giant code block as demonstrations seem to organize things is probably not going to scale very well for anything nontrivial)
Answer: In my opinion, rules and pattern matching are central to mastering Mathematica. I strongly recommend Demystifying Rules by Nancy Blachman published in The Mathematica Journal, Volume 8, Issue 4, for a solid grounding in this area. It is available on-line at The Mathematica Journal
Answer: For neat tips and tricks, there is a daily tip posted to the MathematicaTip twitter page.
Comment: This is a pretty good resource. It has lots of small, easy to digest snippets.
Answer: The Mathematica GuideBook by Michael Trott always gives me lots of inspirations. Beside of it (and other places been mentioned above), I like exploring the SystemFiles folder. Some interesting tricks (especially about interface and FrontEnd) are hiding there.
Comment: @Verbeia Some undocumented things can be learned from the system files. such as `"SyntaxColoringReasons"` for `CurrentValue` which can be seen in WhyTheColoring.nb (`Dynamic[CurrentValue[InputNotebook[], "SyntaxColoringReasons"]]`), system fonts classification which can be seen in UnicodeFontMapping.tr, some inappropriate converting when import GBK encoded Chinese text can be corrected by manipulating CP936.m, etc.
Comment: The SystemFiles suggestion is a good one. Do you have any particular examples to share?
Answer: The 'Mathematica GuideBook' series by Michael Trott has tons of good examples that go much further than typical 'toy-examples'. I found it a very valuable and thorough ressource for learning the ins and outs of the Mathematica language.
Answer: Nobody's mentioned the packages that come with Mathematica.  There's a heap of great coding examples in there, especially the later packages.
Answer: Fourth fork of the list of links.
Manipulate/Dynamic

Using Refresh[..] with TrackedSymbols
Got Manipulate? (Seminar slides)
Manipulate secrects revealed
What is the equivalent of a prototypical Manipulate in lower level functions?
Selective evaluation of blocks of code in a Manipulate
Understanding CDF
How to modularize custom controls for Manipulate?
http://reference.wolfram.com/mathematica/tutorial/AdvancedManipulateFunctionality.html (See last paragraph)
Question about collections of custom GUI controls for Mathematica
How to execute a function each time the slider is dragged?
How can I make controls have Button-like behaviour?
How can I effectively performance-profile Dynamics?
Multiplayer game in Mathematica: how to communicate between kernels?
Mathematica Manipulate with macros AND variable number of controls (persistence desired)
How to wrap this dynamic code inside a Manipulate?
For[] or While[] can't be used inside Manipulate[]?
Manipulate with explicit updates
Wrapping EventHandler by Table
Generalized input (look at Interpretation)
What does None mean in a control specification for Manipulate?
How to anchor a Pane's scroll position to the bottom?
How to visualize/edit a big matrix as a table?
Button evaluation inside DynamicModule
Altering layout and sizing of Manipulate controls?
Unexpected Setter Bar Behavior when Manipulate Nested in Dynamic Module
How can I use Dynamic to run a script when a new file is added to a directory?
Using list elements in TrackedSymbols for Dynamic
Evaluation order control
How to make slider in/visible in Manipulate?
How to visualize the structure of this dynamic programming code
Slider resistance and Play-Pausing with Manipulate, TabView, and attempt an granular TrackedSymbols?
trouble with Dynamic range in SetterBar
How to save Manipulate bookmarks permanently?
Writing a simple application: interactive quiz for multiplication table practice
Dynamically Updating Function
How can I create an advanced grid interface?
Alternative updating of a dynamic expression
How to anchor a Pane's scroll position to the bottom?
How to Initiate a queued evaluation from a Dynamic GUI without using a Button
Evaluation order control
How to avoid an expensive subset of a Manipulate computation when dependent variables have not changed?
Slider resistance and Play-Pausing with Manipulate, TabView, and attempt an granular TrackedSymbols?
OOP applied to manipulate
Event driven GUI
Using Refresh[..] with TrackedSymbols
What does None mean in a control specification for Manipulate?
SaveDefinitions considered dangerous

Palettes

Can I easily post images to this site directly from Mathematica? (Yes!)
A palette of accumulated expertise
For Sale! Three potentially useful palettes
What are the most common (usual) ways to make palettes with non-trivial functionality?

Finance (but not only)

Learning Finance with Mathematica
http://www.wolfram.com/events/chicago2011/nVidiaFinancePresentation.nb
High-Performance Computing in Finance
http://blog.wolfram.com/category/finance/
How can you compute Itō Integrals with Mathematica?
Fast Simulations with Compile
Problem with Financial Data
Growth theory with Mathematica
How to model Macroeconomic dynamics?
Making a Stock Options Database in Mathematica
How to request financial data from Yahoo's YQL and Quandl?
Graph databases / Nosql with Mathematica
http://www.mathestate.com/
How can I connect to the IB TWS platform from Mathematica?
Exploring asset allocation
Empirical market microstructure

Correlation

What is the best way to create a correlation matrix heatmap with values?
Correcting a correlation matrix to be positive semidefinite

Proba/Stats

DistributionFitTest[] for custom distributions in Mathematica (How to define a custom probability distribution in Mathematica 8)
Probability: proportion of 1000 random lists for x that contain the same nrs
Filtering beat-to-beat heart rate data
Time-series decomposition in Mathematica
http://blog.wolfram.com/2013/02/01/the-ultimate-univariate-probability-distribution-explorer
Mathematica code for hidden Markov models (HMM)
Autoregressive distributed lag model
Finding the likeliest path in a Markov process

Misc

Open Excel file with Mathematica
Exporting data from Excel into Mathematica using clipboard
how to delete specific data from text file and then update it
Tricks for making graphics for the math book
Automating SFTP upload within Mathematica?
How to include Mathematica animation in a PowerPoint presentation?
Calling external commands without showing command prompt on windows
Web Browsing Automation with Mathematica
Capturing Data from an Android Phone
Quit the Kernel and start new session automatically
how to write string to file without Quotation mark
How to create a progress bar?
Creating "detached" plots
Using parallel kernels
Asynchronous evaluation: Is it possible?
Transferring a large amount of data in parallel calculations
Are built-in Mathematica functions already parallelized?
Does parallel programming use up large quantities of memory in Mathematica?
Why is this parallel evaluation with Dispatch[] so slow?
Computing Many Slow I/O Operations
Evaluator option for Mathematica Scripts
Writing data to a common file during parallel processing
ParallelTable and DistributeDefinitions
http://reference.wolfram.com/language/ref/DistributedContexts.html
Suspecting bug in Parallel Framework
How to share numbered variables between kernels
Evaluate while external command is being run
http://reference.wolfram.com/legacy/applications/parallel/
Answer: Not strictly a Mathematica blog but Rip's Applied Mathematics Blog is a very nice resource for advanced Mathematica problem solving. Rip makes regular weekly posts on whatever interests him that week and they usually include some neat implementation in Mathematica.
And another very good reference Mathematica blog by Kris Carlson with interesting methods and examples:
Comment: If bewildered one should look into examples http://rip94550.wordpress.com/2012/04/16/trusses-snow-load-on-howe-fink-and-pratt-trusses/
Comment: Thanks this blog is very interesting.
Comment: The author of this blog has passed away late last year.
Answer: I'm not sure this has already been posted but I found these tutorials really helpful as a beginner. They are problem based (similar to the Euler Problems) and the author takes you through the solutions in a step wise fashion. Hope it helps.
Answer: Blogs

http://mathematica.blogoverflow.com/
http://mathematica-bits.blogspot.com/ (Blog of Yaroslav Bulatov dedicated to graph theory)
http://12000.org (Blog of Nasser M. Abbasi)
http://blog.matthen.com/  (Various interesting demos by Matt Henderson)
http://ibnhconsulting.blogspot.co.uk (Blog of Mike Honeychurch)
http://textanddatamining.blogspot.com/  (Blog about data mining in texts)
http://shuisman.com  (Blog partly about Mathematica)
http://mathgis.blogspot.com/ (Lunchtime playground)
http://mathematics-diary.blogspot.com (Blog of Nilo de Roock)
http://www.walkingrandomly.com (Blog about scientific programming languages)
http://rip94550.wordpress.com/ (Rip's Applied Mathematics Blog, Mathematica is used to demonstrate various concepts of graduate level)
http://mathematica-guide.blogspot.co.uk/ (Blog of Kris Carlson)
I liked this post: Functional-Procedural Fusion, this function is useful for this style of programming: MapEach[function_]:=(function/@#)& (for example: {1,2}//MapEach[2 #&])
http://mathematicanews.blogspot.co.uk/

Personal websites

http://math.sduhsd.net/MathematiClub/ (Games, various interesting notebooks)
http://www.theodoregray.com/BrainRot/ (Conversation with Theodore Gray one of the historical developer of Mathematica)
http://www.dbaileyconsultancy.co.uk/ (Super Widget Package, can be interesting, but using Dynamic with built-in Mathematica GUI components is now easier)
http://www.verbeia.com/mathematica/code.html  (Various interesting links to other packages)
http://katlas.org/wiki/Main_Page  (Knot Atlas, package available)
http://www.weber-und-partner.com/resources (Some applications to mathematical finance, package working as an interface to Quantlib)
http://home.comcast.net/~djmpark/Mathematica.html (Site of David Park, Expression manipulation and some interesting packages)
http://www.mathestate.com (Site about finance, with some links to demonstrations)
http://library.wolfram.com/infocenter/Conferences/8073/ (A formal approach for modeling and simulation)
http://www.bugman123.com/ (Paul Nylander)
http://vimeo.com/groups/mathematica/videos (Some cool videos in 3D made with MM)
http://pages.uoregon.edu/noeckel/MathematicaGraphics.html (Creating an Post-Processing Mathematica Graphics (on Mac OS X))
http://www.lauschkeconsulting.net (Some interesting (non free) packages, like JavaTools which provides Mathematica links to Scala, C# and F#)
http://www.oftenpaper.net/sierpinski.htm (Very cool pictures and math using Mathematica, code available)
http://dev.ragfield.com/ (Useful Mathematica scripts among others. Connection with iTunes,Twitter, YouTube, Font outlines,Mapping GPS Data are some of them)
http://mathematicaforprediction.wordpress.com (Blog for different methodological and algorithmic aspects of computing predictions with Mathematica.)
http://www.familydahl.se/mathematica/ (Ingolf Dahl, package implementing several interpolation methods)

Calculus

http://www.wright.edu/~richard.mercer/Calculus/Lab/Download/index.html (Various notebooks about mathematics)
https://sites.google.com/site/calcuplus/ (Introductory calculus course with CDF demos)
http://library.wolfram.com/infocenter/TechNotes/6111/  (Numerical analysis, code of a lot of common numerical methods)
http://mathfaculty.fullerton.edu/mathews/n2003/NumericalUndergradMod.html

Resources on other languages

Having used Mathematica as a "gateway" language, where to from here?
Online interpreters can be found here Online-REPs-and-REPLs in order to test ideas in a lot of different languages.
https://c9.io (Cloud 9)
This resource is very useful for common languages like Java, C++ or VBA
http://www.java2s.com
C++ reference books
Tutorials on a lot of current technologies (but Mathematica is missing there ...) http://www.tutorialspoint.com
http://rosettacode.org/wiki/Mathematica (Several algorithms in Mathematica together with other languages)
http://www.cheat-sheets.org (Cheat sheets for a lot of languages)
Wikibooks, can be handy for a quick reference on many languages.
The Archive of Interesting Code
dGSD, a great tool for organizing your projects and knowledge (Based on TiddlyWiki, a wiki stored in a single HTML file).
Or use Evernote with the secret weapon (this thing is so good ...)
Alternatives to Mathematica
google-styleguide

Forums
MathGroup

https://groups.google.com/group/comp.soft-sys.math.mathematica
http://www.mathkb.com/Uwe/Forums.aspx/mathematica/201107/1
http://forums.wolfram.com/mathgroup/

Stack Exchange sites

Mathematica questions on Stack Overflow
Mathematica.StackExchange (look at "favorites" in the profiles of active users for reading past interesting answers)
Mathematica questions on Stack Exchange: all questions tagged mathematica on the Stack Exchange Network

Links to some packages

PackageData.net is a comprehensive collection of links to packages
What third-party packages do you use?
http://www.xact.es/index.html (Open source tensor package suite)
also see this post Differential geometry add-ons for Mathematica and Tensor analysis
FeynRules by Neil D. Christensen, Claude Duhr & Benjamin Fuks (latest version: 1.6.0, package to calculate Feynman rules)
Automatic physical units, by Jon McLoone (2010, available from the Wolfram Library Archive)
http://library.wolfram.com/infocenter/MathSource/7655/
NCAlgebra (Non Commutative Algebra Package)
Sym (Symmetry analysis of differential equations)
Some packages written by Leonid Shifrin
http://www.mathprogramming-intro.org/additional_resources.html
https://gist.github.com/lshifr
Various links to common websites (Google, Amazon,...), financial data, and some useful functions for manipulating time series.
https://github.com/fmeinberg?tab=repositories
RUBI (symbolic integration rules)
MTools (Object oriented programming)

Packages for preparing publication-quality scientific figures

LevelScheme by Mark Caprio (latest version: 3.52, Sep 2011, for Mathematica 6 and higher)
Presentations and other packages by David Park (latest version: 25 Aug 2011)
A WorkLife Framework by Scientific Arts LLC (extendable and customizable toolset that broadens Mathematica's scope across many aspects of daily work)
FeynArts by Thomas Hahn (latest version: 3.7, 27 Mar 2012, package for generation and visualization of Feynman diagrams and amplitudes)
Writing and Publishing a Book with Mathematica by Paul R. Wellin (2005, available from the Wolfram Library Archive)

Useful non-free tools for development, deployment, distribution, linking, etc.

Workbench by WRI, current version: 2 (official Mathematica IDE based on Eclipse, great for projects involving several packages and generating integrated documentation)
webMathematica by WRI, current version: 3 ("Deploy high-powered applications as interactive websites")
gridMathematica by WRI, current version: 8 ("Easily control CPUs and GPUs to solve large problems fast")
SystemModeler by WRI, current version: 3. Integrated symbolic modelling platform.Some related links: MathModelicaPaper, ObjectMath, Modelica, OpenModelica
How to do System dynamics simulations / diagrams in Mathematica?
Finance Platform by WRI, current version: 1. Includes option pricing, risk analysis, enterprise system development, and interactive reporting
Mathematica Applications and Add-Ons (all add-ons marketed via WRI, related to Mathematica)
Mathematica Link for Excel by Episoft, Inc., current version: 3.5 (links Microsoft Excel with Mathematica)
Answer: Stephen Wolfram:
An Elementary introduction to Wolfram Language
Also, this does not belong 100% here but it is an overshelming list of reference to be missed.
A Bibliography of Publications about the Mathematica Symbolic Algebra Language
Answer: I am not sure if it has already be mentioned.
Adding Object-Oriented
Capabilities to Mathematica
Answer: I'm a beginner, and I find it interesting to explore the documentation. Some of the commands I've read about have given me interesting ideas for programs. Also, I'm not sure if this has been mentioned, but the Wolfram Demonstrations Project has a bunch of amazing programs you can play with and download the code from.
Answer: ApplicationMaker shows how to create packages that look like native functionality, including integration into the Documentation Center.
Answer: I have been adding some new content here (mostly following along with the elementary introduction book and doing explorations in machine learning):
https://www.livecoding.tv/learn/wolfram/
These 'live coding' sessions are recorded so you can watch them. They are a little bit different from pre-recorded video tutorials, because there is a chat window where 'live watchers' can ask questions (which you can not do when you watch the recording, of course).


Sound Design Lecture

Question: Hi! I was invited to talk about Sound Design in a film festival (focused in cinematography). This is the first time I will be giving a conference like that, and I would like to ask you for some help. Does anybody have any ideas, tips, advice? I believe the assistants won't know much about the technical stuff about sound design, and I really think they won't care, so I would like to have a more "conceptual" approach to sound design, and I would like to show some examples (movie scenes, soundscapes, etc) Any ideas or thoughts? Thanks!
Answer: I think it's always good to talk about the intention of sound and how the designer went about it. It's great to pull references from the Hollywood sound design superstars, but why not talk about your own work and how you go about your practice. It'll give them a first hand explanation of sound design, and it'll also be a great calling card for you.
Some Hollywood Examples
- Ben Burt using a slinky to create whooshes for his sci-fi films.
- Ren Kylce talks about how he went about recording the New York ambience for the scene where Morgan Freeman goes to bed before the starting credits of Seven.
- Richard King seems to get a featurette about the work in his films.
- Raging Bull, Jurassic Park and Saving Private Ryan have very good writeups and documentaries about their sound design.
- Directors Terence Malik and Robert Altman place great emphasis on sound in their films.
- I even thought the Muppets was an excellent example of how Foley and sfx blurred the lines of 'reality' for the audience.
I love talking about films and their sound design, so pop me an email if you need more examples or something more specific.
Answer: Hi Manuel,
Perhaps this depends on how experienced you expect your audience to be, but as the conference is focused on cinematography, your approach could be trying to engage your audience with ideas which cross over to their practice. I've often thought that if I ever need to speak in front of a group of directors about sound design I'd base my talk on Designing a movie for sound by Randy Thom. Getting them excited about sound, and how considering it can potentially enhance their own work (and the film as a whole) would be a big achievement.
Answer: I agree with Mark, I think this is a great opportunity to speak directly to the cinematographers and talk about how sound can help and affect their work. A lot of directors and DPs that I have worked with have heard the "sound is 50-80% of the final film" quote, but they don't know what that really means. Therefore, I would say a good starting place is to talk about the communication in pre-production and production that it takes to get a good sounding movie in post, and the opportunities that can arise when the sound team has a voice during storyboarding.
Best of luck!
~Matt
Answer: Don't know if you have the time and money to grab it but Micheal Chion's 'Audio-Vision' is brilliant. I read it in my first year of uni and it explains the relationship between what we see and hear in a descriptive, interesting and easy to follow way. It also goes into the diagetic, non-diagetic paradigm and how this relates to the Mise-en-scène.
£7.80 from amazon.
http://www.amazon.co.uk/gp/offer-listing/0231078994/ref=sr_1_1_olp?ie=UTF8&qid=1336416958&sr=8-1&condition=used

Sound Design Lecture


Is the topological concept of collapsible useful?

Question: I ask this question because in the process of reviewing for my topology comp, I began rereading Alg Topology by Hatcher.  In the introduction is the famous Bing's House of Two Rooms.  I thought this was an interesting example and began reading about it on the web (procrastinating).  Several sites note that Bing's house is contractable (as described in Hatcher) but not collapsible.  The definition of collapsible does not appear in any of my topology or alg topology books (Munkres, Hatcher, Spanier) and the only definition I have found is on wikipedia.  So this brings me to my question, is collapsible a useful topological concept? And can anyone show me why Bing's house is not collapsible (I guess I probably do not fully comprehend the definition)?
Comment: http://eom.springer.de/c/c110310.htm
Comment: Is it possible that it's because you misspelled it?
Comment: Spelling never was one of my strong suits.  I checked my browser history and I did spell it correctly in my searches (probably thanks to google).  Thanks for the link.
Answer: The notion of an elementary collapse is the key construction in the definition of a simple homotopy-equivalence.  Simple homotopy type is a refinement of homotopy type, and it has many uses.
One example: The s-cobordism theorem is the main structure theorem for high-dimensional manifolds, and it has to do with the question of when two simple-homotopy equivalent manifolds (technically s-cobordant manifolds) are diffeomorphic.
You might want to take a look at Marshall Cohen's introduction to simple homotopy theory textbook.   One of the key examples there is that simple homotopy type is the same as homeomorphism type for lens spaces, but homotopy type is a different, weaker relation.
Whitehead torsion and Reidemeister torsion are simple homotopy invariants.  In a sense you can think of simple homotopy theory as a space-level analogue of elementary row and column operations on a chain complex.  So it gives you a sense for why it should somehow be more relevant to forming a bridge between topology and algebraic constructions.
As for Bing's house, I think the answer is kind of simple.  Where would you start the collapse?
Comment: The wikipedia webpage http://en.wikipedia.org/wiki/Whitehead_torsion is very nice and explains how this invariant is related to algebraic $K_1$ of the group ring of $\pi_1$, hence to elementary matrix operations.
Comment: By the way, what's the precise definition of a collapse of a simplicial set?  All of the definitions I've found are only for simplicial complexes or CW complexes?
Answer: There is a simple reason for appreciating collapsible objects: a collapsible (PL) n-manifold is always (PL) homeomorphic to a disc! (Although a contractible one may not, for instance in dimension 4.) For a proof, see [Rourke C.P., Sanderson B.J. Introduction to piecewise-linear topology (Springer, 1972)].
Concerning Bing's house, you cannot do any elementary collapse: in order to do such a collapse, some point must have a link (PL)-homeomorphic to a disc (of some dimension). But the points in Bing's house have links homeomorphic to a circle, a circle with a radius, or a Mercedes Benz symbol.
Answer: To add a little to Ryan's answer:
This topic is maybe not exactly a part of algebraic topology. It's more like an area of application of algebraic topology to certain important special classes of spaces.
When $A$ is a subcomplex of $B$ (both of them finite) and $B$ collapses to $A$, then the inclusion map $A\to B$ is said to be a simple homotopy equivalence, as is any left inverse of such an inclusion, and more generally any map between finite complexes that is homotopic to a composition of such things. A homotopy equivalence $A\to B$ between finite complexes determines an element of the Whitehead group $Wh(G)$ of the fundamental group $G=\pi_1(A)$ (a certain abelian group that depends functorially on $G$ -- the quick definition is take the direct limit of $GL_n(Z[G])$ as $n$ goes to infinity, abelianize, and kill the the invertible $1\times 1$ matrices $g\in G$ and $-1$). It is simple if and only if this element is zero. (Sometimes the latter is taken as definition of simple.) The group $Wh(1)$ is trivial, so every homotopy equivalence between simply-connected finite complexes is simple. The house with two rooms shows that the inclusion of a subcomplex can be simple even if there is no collapse; there is a larger complex collapsing both to the house and to the point.
The question of whether a homotopy equivalence is simple is unchanged by subdivision of a complex, so sometimes you can prove that a given homotopy equivalence is not homotopic to any simplicial or cellular isomorphism by proving that it has nontrivial Whitehead torsion. If you can enumerate all the (homotopy classes of) homotopy equivalences from $A$ to $B$ and you find that all of them have nontrivial torsion, then the spaces are really different. Eventually the topological invariance of Whitehead torsion was proved, making for stronger statements.
$Wh(G)$ is trivial for lots of (potentially for all) torsion-free groups $G$, but is usually nontrivial for finite $G$.
Answer: If you're willing for "useful" to apply to a field other than topology itself: collapses are quite important in combinatorics.  Elementary collapses correspond (via Euler characteristics) to matching up equi-numerous objects counted with opposite signs in inclusion-exclusion type problems.
Discrete Morse theory is the generalized version of this.  The basic idea in discrete Morse theory is that one can collapse faces of adjacent dimension in skeleta of a simplicial complex, then glue on higher dimensional faces in a way respecting the collapsing (without changing homotopy type).  Discrete Morse theory has been a quite important tool in topological combinatorics for the past 10 or 15 years.  See the papers of Forman: "Morse theory for cell complexes" introduced the topic (though I should mention that the basic idea was discovered by Ken Brown in "The geometry of rewriting systems: a proof of the Anick-Groves-Squier Theorem"), or "Topics in combinatorial differential topology and geometry" is a survey article.
Discrete Morse theory can also be seen as a generalization of the theory of shellings (also based on a collapsing idea), which has been important in topological and algebraic combinatorics since the late 70s/early 80s.
Comment: For a number of reasons, thank you for this.
Answer: A small addendum: Collapses seem also useful in some applications, namely practical homology computations, as preprocessing steps for algorithms that compute homology. (Concretely - say you have to compute the homology of a simplicial complex with lots of facets; before starting to write down adjacency matrices etc. you might want to check if you can first "simplify" the complex with collapsing steps.) Sometimes this approach fails, as you see if you start with the Bing house. Yet sometimes one sequence of collapses works much better than another sequence, so it's also a matter of luck.
However, an advantage of collapsibility over contractibility is that the former is an algorithmically-decidable property. (A non-efficient algorithm to decide collapsibility consists in trying all possible collapsing sequences, and see if one leaves us with a point.) In contrast, contractibility is in some cases algorithmically undecidable (by reduction to the word problem). For more info, cf. the recent preprint by Martin Tancer.


Why is Joomla based website that was copied off of live server into localhost not showing pictures and throwing 404 error?

Question: I have copied Joomla based website via FTP onto my machine and I am trying to make it run on my localhost which is provided by the latest version of XAMPP. I have exported and imported the DB with no problems. I have placed all the files and folders into HTDOCS folder but when I go to localhost example site all I get is the text that is on the front page but no pictures and it displays 404 Error. Do I need to make changes to .htaccess? If so, can some one point me to the right direction? Thanks
Comment: What is the URL for the image coming out as? And what should it be?
Answer: This being not a discussion forum, i'll just answer the question.
We cannot be sure that .htaccess has anything to do with the issue you are experiencing, because a 404 error can also depends on other factors. The better thing you can do is to rename it from ".htaccess" to "htaccess.txt", so that it gets disabled, and check again if your site works.
My guess is that, unless you previously made significant changes to this file, it is not the cause of the issue.
So, on a bonus note:
 - check carefully configuration.php file and verify *_path and live_site parameters
 - if you are able to access the administrator part of the site, disable all Joomla or 3rd party SEF functionalities.
If this does not lead you to a functional site there is some serious misconfiguration and a simple answer surely can't fix it.
Answer: There is a configuration error. It depends on the type of website software you are using. Sometimes these can take a long time to debug.
I would also advise installing the Xampp on another machine.
   Open the browser to the url. Scroll down to the end of the page and get the error message. Copy that into Google with the brand. "Error loading show_html.php Joomla"
You will probably find a dozen possible fixes. Also google "Error loading show_html.php Joomla Xammp"
Make sure the user, login and permissions (in database) are correct.
Answer: I've seen something similar happen before, and in that case, it was because of how the links on the images/urls/everything were set up. In this case, on a test.website.com, all the urls were written in such a way that they weren't portable. For example the navigation links were setup like:
    About
Because of this, they retained the 'test' part when the site was made live. Instead, they should have been written like:
    About
So that no matter what the url of the site was/is/will_be, the navigation to "About" will not be broken. This happened to ALL the links and images on the site and was a huge mess.
I apologize about the anecdote, but perhaps this is what is happening with you? The case I saw it happen with was Wordpress when it was moved off the test to the live server... all the links had to be manually changed in order to point to the right places.
Answer: I recommend using Akeeba backup component. it Backups your site as it is and you can install it in any other server by running the kickstart installer provided in the same webpage as component.


Using poetry in novels a good option?

Question: I write fiction as well as poetry. And many a times I use poetry as a tool to bring out that acute feeling of pain or love (as required) in my explanations. What if I use poetry  to introduce or end a scene? Is it alright to do so, or does it also has some damaging effect?
Answer: I've read several books where chapters are introduced by a poem. I do not see a problem with that.
If you choose a more disruptive approach, like putting the poem between scenes (or within one scene), you generate a "damaging" effect. Many readers will be puzzled, you tear them out of your story and normally a writer tries to avoid exactly that.
But breaking a rule is not automatically a bad thing. If you want to do it, try it. I would probably not read it, but I could imagine that there is an audience which like this experiment.
The worst thing that could happen is that I'm wrong and no-one likes it. Then you have failed and failing is good, because you can learn from it. Experience is such a valuable thing, so go for it.
Comment: My point to ask was not to put poetry in between scenes, I would rather not. But to introduce or end a scene on a poetry. Thank you.
Comment: @JATagala - Would you consider editing this information into your original question?
Answer: As an example, The Malazan Book of the Fallen series by Steven Erikson opens every chapter with either a poem, or a snippet from an academic work from his fantasy world (mainly poetry, though).
My experience with this work is that, while I find the story amazing, I'm largely indifferent to the poems, and find myself often skipping them. They're often a distraction at best, or self-indulgence at worst.
This is not because I'm against poetry, it's just that they seem to have little or no bearing on the actual story itself. If you take the poems away, the story doesn't suffer. You don't miss out on some vital info. True, they do add a certain degree of richness and authenticity to the fantasy world, but for the most part, I couldn't see the point, and I honestly felt the books would be better without them, since they often break the flow of the narrative.
The point to be made is this: don't just insert the poems because you like poetry. Ask yourself what purpose your poems serve. Can the story live without them? Are they integral to the story? Do they fit in with your narrator, or your characters (i.e. who is telling the poem, and why)?
If you feel you still want poetry in your work, then I definitely suggest starting each chapter with the poem. This means people like me could skip it (if we don't feel like reading poetry), and it doesn't break the flow of the story too much by appearing in the middle of a chapter.
Answer: One of your characters could "write" the poem and recite it to another. You could present the poem as something in a book which a character reads, or establish that  your character is a poet who is always composing in her head and tends to think in verse, so the poetry is actually coming from her thoughts.
But to stop dead in the middle of prose narration, insert a poem, and continue merrily along is disruptive to the flow of reading. Unless you're writing something truly surreal, where  you're playing with the medium as part of how you're telling the story, I don't recommend it.
Comment: John Smithers made a good suggestion: at the beginning or end of a break (scene, chapter, part, section). But not in the middle.
Comment: What if I build up a scene and then to inhance the effect I use a poetry?
Answer: Poetry in a novel is dangerous because it backfires easily if it's bad, and (not to say anything at all about you) it's often bad.  Or at least not good.  Or just plain puzzling, like it's been put there just because it's Significant and the reader doesn't know why it matters that it's poetry.  If the poem isn't good enough to stand on its own, the reader will be right to reject it.  Jo Walton had a nice snark in the first post of her Rothfuss reread:

Apart from being that rare thing in fantasy, actually good poetry...

You have to be careful not to end up as one of her many targets.

Using poetry in novels a good option?


Generators for congruence group $\Gamma(2)$

Question: Is the congruence
group $\Gamma(2)$ generated by the upper triangular matrix $(1, 2; 0, 1)$
and the lower triangular matrix $(1, 0; 2, 1)$ or does on need to also
throw in the negation of the identity?  To be specific, how do I check that
the negation of the identity is not a word in the above matrices?
Answer: Yes, you need to throw in $-I$. Check that the set of all matrices
of the form
$$\left(\begin{matrix}
a&b\\\
c&d
\end{matrix}\right)$$
with $b$ and $c$ even and $a\equiv d\equiv1$ (mod $4$) is a subgroup
of the modular group.
Comment: Wadim, exercise 6 does not answer the question.
Comment: And Robin explains why the minus identity is not in the group generated by two others.
Comment: It's Exercise 6 on p. 34 in M. Yoshida's "Hypergeometric functions---my love": the group $\Gamma(2)$ is generated by the $[1,2;0,1]$, $[1,0;2,1]$ and... $[-1,0;0,-1]$.
Answer: There is already an answer posted, but I can't resist making two remarks.  The first gives an alternate proof that also works for $\Gamma_n(p)$ for all $n$ and $p$ (and also gives a minimal generating set for these groups, at least when $n \geq 3$).  The second says a little more about $\Gamma_2(2)$.  By the way, $p$ doesn't have to be prime.
1) Let us define a surjective homomorphism $f : \Gamma_n(p) \rightarrow \mathfrak{sl}_n(\mathbb{Z}/p\mathbb{Z})$.  An element $M \in \Gamma_n(p)$ is of the form $M = \mathbb{I}_n + p A$ for some matrix $A$.  Define $f(M) = A$ mod $p$.  Amazingly enough, this is a homomorphism!  Indeed, if $N = \mathbb{I}_n + p B$, then
$$f(MN) = f((\mathbb{I}_n + p A)(\mathbb{I}_n + p B)) = f(\mathbb{I}_n + p(A+B) + p^2 AB) = A+B$$
modulo $p$.  This is sort of like a derivative!  It is an easy exercise to check that the image of $f$ lies in $\mathfrak{sl}_n(\mathbb{Z}/p\mathbb{Z})$.
To check that $f$ is surjective, let $e_{ij}$ for $i \neq j$ be the identity matrix with a $1$ inserted into the $(i,j)$ position.  Then $f(e_{ij}^p)$ is the matrix with a $1$ in the $(i,j)$ position and zeros elsewhere.  To get the diagonal matrices, define $f_i$ for $1 \leq i < n$ to be the result of inserting the 2x2 matrix $(1+p,p;-p,1-p)$ into the identity matrix with its upper left entry at position $(i,i)$.  Then $f(f_i)$ is the matrix with a $1$ at positions $(i,i)$ and $(i,i+1)$, a $-1$ at positions $(i+1,1)$ and $(i+1,i+1)$, and zeros elsewhere.
The existence of $f$ implies immediately that $\Gamma_n(p)$ is not generated by the elementary matrices $e_{ij}^p$.  A theorem of Lee and Szczarba says that in fact $f$ gives the abelianization of $\Gamma_n(p)$ for $n \geq 3$.  Thus for $n \geq 3$ we have $[\Gamma_n(p),\Gamma_n(p)] = ker\ f = \Gamma_n(p^2)$.  One can check (I've never seen this in print) that $\Gamma_n(p)$ is generated by the $e_{ij}^p$ and the $f_i$ when $n \geq 3$.  For the case $n=2$, see the answers to my question here.
2) In fact, we have $\Gamma_2(2) \cong F_2 \times (\mathbb{Z}/2\mathbb{Z})$.  Here $F_2$ is a rank $2$ free group generated by $e_{12}^2$ and $e_{21}^2$ and $\mathbb{Z}/2\mathbb{Z}$ is generated by the central element $(-1,0;0,-1)$.  This can be proved in many ways : I leave it as a fun exercise!
Comment: Quite beautiful! Thank you for adding this.
Answer: This follows from the fact that the image of $\Gamma(2)$ in $\text{PSL}_2(\mathbb{Z})$ is freely generated by the two matrices you describe.  There is a geometric proof of this fact based on the fact that $\Gamma(2)$ acts properly discontinuously on the upper half plane $\mathbb{H}$ which I sketch here.