Programming, the old fashioned way
This page will link to programming examples and expositions.
Programs
- Computing e
- One of the things computers are useful for is computing large (and small) numbers. The number called e is the base of natural logarithms, and is one of those "transcendental numbers". This program computes the value of e to 5000 decimal places.
- Building mazes
- Long ago, I came across a technique that permitted me to construct a rectangular maze that contained one (and only one) path from one point to any other point in the maze. This technique used recursion to tunnel a path out from a starting point in the maze. I have played around with this recursive maze builder for quite a while.
- Counting words using a binary tree to hold the dictionary
- In "The C Programming Language", the authors present an example program that counts unique words in a text. Such a program needs to maintain a list of every unique word encountered, and for each word, an associated count of the number of occurrences. We can design the dictionary in many different ways; a linear list, a binary tree, a balanced tree, a relational database, etc. This program implements the dictionary as a binary tree.
Linux Clues
- What is my IP address?
- I have had need, on occasion, to determine the IP address assigned to my PPP connection by my ISP, but have been reluctant to code the usually complex scripts nececssary to extract this information from the results of the 'ifconfig' command. Fortunate for lazy me, there is an easy way to determine the PPP IP address (more or less) built right in to the pppd daemon
- The difference between hardlinks and softlinks
-
Q: Can someone give me a simple explanation of the difference between a soft link and a hard link? The documentation I've read mention these links but make no strong explanations of their meaning and how/when to use them. Thanks!
A: OK, I'll give it a try...
- What makes an application executable in Linux?
-
Applications are collections of executable files, shared-object files (DLLs in Windows-speak) and data files. In Windows, the file name is the indication; if the filename ends with one of a number of character patterns (.COM, .EXE, .DLL, .SCR, etc.), the Windows kernel will load and execute the file.
Linux uses a different mechanism from Windows to indicate whether a file can be executed or not.




