A word on content.

Introduction

This is a programming blog which will be going over many different topics. The primary language I will be using is C++, but we will also use C. In the future, I plan to bring Haskell and Prolog into the mix.


I intend for this to be a very abstract blog with very concrete examples. 

Content of This Blog

This blog will also be implementing very many algorithms for the sake of learning how they work, include many features of that most treat as black boxes for their entire career.

I will be posting and analyzing snippets of code, as well as full programs. We will also go over interesting theories in the field, implementing the ones that are short enough. This includes going beyond the normal consideration - "needless details" to the developer who isn't curious about the insides of the abstraction. (Or sometimes just doesn't have the time to do it for production code.)

The following is an outline for a planned set of posts:

  • The end product will be a working string class with clean and acceptable code, but the goal was the process -- to learn more about how the internals work. Almost by definition, we will be using as few libraries as possible, even if it means re-implementing code.
  1. Implement a Binary Search Tree (BST) class and talk about it's uses, specifications, and mathematical basis.* 
  2. Derive a Rope class from the BST class.
  3. Derive a string class designed for long strings from the Rope class that is fully compatible with C strings and C++'s std::string.
We will use that string class for another set of posts that will implement a text editor -- hence the reason for using the rope structure. (There will be more interesting things like markov chains, ANNs, et cetera.)

*This is true of all posts!

Other:

I highly encourage comment discussions (as well as "bug reports") and I appreciate suggestions for posts and topics.

I am using a third party code "prettifier" called SyntaxHighlighter:
int cmp_str(char * str1, char * str2){
    int i = 0, j = 0;
    while(*(str1+i) != '\0' && *(str2+i) != '\0'){
        if(*(str1+i) == *(str2+i)){
            j++;
        }
        i++;
    }
    
    if(j == i){
        return true;
    } else {
        return false;
    }
}

0 comments:

Post a Comment