Pink Floyd Again

As a Pink Floyd song came across my iTunes playlist, I was prompted to look them up on wikipedia, youtube, and the like. I also watched a lot of the interviews from the band and others about Syd Barrett. I seem to do this every couple of months, and I always settle on two Pink Floyd songs as standing out from the rest, both musically and lyrically.

Comfortably Numb
Shine On You Crazy Diamond

This set of lyrics from Comfortably Numb is particularly powerful in its imagery.

There is no pain, you are receding.
A distant ships smoke on the horizon.
You are only coming through in waves.
Your lips move but I cant hear what youre sayin.
When I was a child I had a fever.
My hands felt just like two balloons.
Now I got that feeling once again.
I cant explain, you would not understand.
This is not how I am.
I have become comfortably numb.

It would have been really amazing to see Pink Floyd perform live, but sad to say I’ll have to settle for youtube. I hope there’s a band as powerful as that in my lifetime, and that I get to see them.

Learning page

I kept updating my blog with a list of things I’d like to learn or improve upon, and it seemed redundant to continually copy/paste the information to a new post, just to update it. I would however like to keep the list online, so I’ve moved it to this single location.

How to Win Friends and Influence People

Relating to the previously posted quote.

This is the first book review to hit this blog. I’m not sure that it will be a reoccurring theme, but it’s possible.

I’m a regular user of the site stackoverflow.com, and one of my favorite questions on the site is What non-programming books should programmer’s read?. In this thread, one of the books caught my eye: How to Win Friends and Influence People, by Dale Carnegie.

Why did this book catch my eye? Frequently I’ve found myself being torn between two opposing factions of thought. One the one side I acknowledge that I’m an isolated creature (to a comfortable extent), and I really don’t mind the isolation. Isolation can be valuable, it lets you explore things in a deeper way that you might otherwise be able to with distractions. Isolation can also help you understand things on a deeper level, such as programming. The other side is a nagging acknowledgment that it’s pretty much impossible to advance in a given career without collaboration or building social ties within a company. So, in that vein, I picked up an audio edition of the book, and have been listening to it over the past week while I play World of Warcraft.

This book will not teach you revolutionary concepts. You’ll spend most of the time remarking at how obvious these ideas are, until you come to the realization that, “I don’t actually implement these obvious truths”. The bulk of the material is an expansion of each of the core principles by way of examples. Some of the examples might seem dated, and they are, but the book was written in the early half of the last century, so it’s understandable. Even with the examples being dated, the ideas from them are still true today, and the subject matter or settings are largely just for illustration.

A lot of what I’ve said here seems ambiguous as to the purpose of the book, but the title sums it up pretty well. It’ll teach you how to get people to your way of thinking, or how to manipulate (this word has such negative connotations…) peoples way of thinking with simple leverage. For simplicity sake, and to give you a taste of why you should read the book, here are the core principles in list form:

Fundamental Techniques in Handling People

  1. Don’t criticize, condemn, or complain.
  2. Give honest and sincere appreciation.
  3. Arouse in the other person an eager want.

Six Ways to Make People Like You

  1. Become genuinely interested in other people.
  2. Smile.
  3. Remember that a man’s Name is to him the sweetest and most important sound in any language.
  4. Be a good listener. Encourage others to talk about themselves.
  5. Talk in the terms of the other man’s interest.
  6. Make the other person feel important and do it sincerely.

Twelve Ways to Win People to Your Way of Thinking

  1. Avoid arguments.
  2. Show respect for the other person’s opinions. Never tell someone they are wrong.
  3. If you’re wrong, admit it quickly and emphatically.
  4. Begin in a friendly way.
  5. Start with questions the other person will answer yes to.
  6. Let the other person do the talking.
  7. Let the other person feel the idea is his/hers.
  8. Try honestly to see things from the other person’s point of view.
  9. Sympathize with the other person.
  10. Appeal to noble motives.
  11. Dramatize your ideas.
  12. Throw down a challenge.

Be a Leader: How to Change People Without Giving Offense or Arousing Resentment

  1. Begin with praise and honest appreciation.
  2. Call attention to other people’s mistakes indirectly.
  3. Talk about your own mistakes first.
  4. Ask questions instead of directly giving orders.
  5. Let the other person save face.
  6. Praise every improvement.
  7. Give them a fine reputation to live up to.
  8. Encourage them by making their faults seem easy to correct.
  9. Make the other person happy about doing what you suggest.

Rivers

“That whereby the rivers and seas are able to receive the homage
and tribute of all the valley streams, is their skill in being lower
than they;–it is thus that they are the kings of them all. So it is
that the sage (ruler), wishing to be above men, puts himself by his
words below them, and, wishing to be before them, places his person
behind them.

In this way though he has his place above them, men do not feel his
weight, nor though he has his place before them, do they feel it an
injury to them.

Therefore all in the world delight to exalt him and do not weary of
him. Because he does not strive, no one finds it possible to strive
with him.”

– Lao Tzu

ASP.NET, nUnit, VB.NET

As the title implies, I’m doing some brushing up on some technologies in the Microsoft stack. I’m going to keep my bases covered in all areas.

In brushing up on my ASP.NET, I’m reminded of a co-worker who once suggested using Smarty with PHP, for separation of presentation and logic. This feels a lot like Smarty. It kind of makes me wonder how JSP does things, and so I’ve added that to a long list of “I’ll learn this better some day”. This list is very long.

My recent research has brought me to the study of binary heap’s and their usage in priority queue’s. I still have some code from a year ago when I was writing them, and I’m glad I’m revisiting this, because the code from a year ago is quite convoluted. I might post some snippets from my new research here at some point.

Blog Considerations, Study List Updated

Updated 6/29/2009 : 09:15pm

I’ve been thinking for some time about the possibility of starting another website. This blog is certainly where I post general goings-on with me and my programming, but I think it would be cool to create a website dedicated to teaching up-and-coming programmers things, categorized in an easy to navigate way. This is partially inspired by StackOverflow.com, but would be targeted at a much lower skill level. My thought is that it wouldn’t necessarily be so basic as to teach things like loops and if statements, but more so at a level where things like algorithms and language constructs would be relevant. The reasoning behind creating a site like this is partially self serving:

“Teaching is the highest form of understanding”. –Aristotle

I feel that by teaching what I know, might help me to even further my understanding of the subjects. The other reason for creating such a site is out of a dissatisfaction for the available knowledge on simpler programming subjects. Sites like stackoverflow are really good, but asking questions on there can be a tricky business if the question is simple, because there is a certain unspoken expectation that you are an above average knowledgeable programmer by using the site. This isn’t a blanket statement, and I don’t wish to be misunderstood when I talk about stackoverflow – I love stackoverflow and I’m an active participant. I just think it would be beneficial to have a website that caters to those who are just getting their feet wet in our industry, to get them excited about furthering their study beyond what they might be getting in a classroom environment. I’ve always felt that individual study time was critical for anyone in our field, but that if someone isn’t all that excited about the field to begin with, they probably aren’t going to go out of their way to learn more about it on their own. The proposed site would give newcomers a taste.

I haven’t purchased a domain for this site, nor have I come up with design or content. It’s an idea that will probably float around in my head for a while before materializing fully.

I spent some time with my previously mentioned study list and determined that I could probably remove some things and add others. Below is the new list, with my current progress.

  • Algorithm to reverse a string
  • Linked List from scratch
  • Quick Sort from scratch
  • Insertion Sort from scratch
  • Selection Sort from scratch
  • Bubble Sort from scratch
  • Singleton pattern
  • Factory pattern
  • Maze solver
  • Composite pattern
  • Decorator pattern
  • Greedy algorithm
  • Backtracking algorithm
  • Memoization
  • Hash table from scratch
  • Binary tree class + search from scratch
  • Graph traversal algorithms
  • Heap from scratch
  • Preventing integer overflow
  • Web services in: Java, C#
  • Java command line compilation flags
  • GCC command line flags
  • Ant, Make
  • Eclipse project/build configurations

Interviews

I knew that when I started the job search, I would ultimately end up doing a lot of algorithm development in my interviews, so I made an investment in a good dry-erase whiteboard to practice on. I explained to Susanna that, as a programmer, a whiteboard is just as important as the computer or code itself, as a consequence of Miller’s thoughts on human memory channel capacity. We as programmers simply can’t juggle all the necessary things that we need to know in active memory – we need to write it down, plan it out. If you are a programmer, you need a whiteboard.

So for my interviews, I’ve been studying data structures, time complexity, design patterns, etc.. I spent some time writing a list of things I ought to study up on. Here’s my list, and my progress for studying.

  • Algorithm to reverse a string
  • Linked List from scratch
  • Quick Sort from scratch
  • Insertion Sort from scratch
  • Selection Sort from scratch
  • Bubble Sort from scratch
  • Singleton pattern
  • Factory pattern
  • Composite pattern
  • Greedy algorithm
  • Backtracking algorithm
  • Memoization
  • Hash table from scratch
  • Binary tree class + search from scratch
  • Heap from scratch
  • Preventing integer overflow
  • Web services in: Java, C#
  • Java command line compilation + flags
  • GCC command line flags
  • Ant, Make
  • Eclipse project/build configurations

The ones I haven’t studied up on I still feel confident that I could write if asked in an interview, but I’d still like to study up on them ahead of time. I also took the time to take all of my study/learning java code and organize it into a package hierarchy for easy access, and discovered a pretty easy way in java to pull resources in.

Chapter 7

Bachelors degree achieved.

Maze Solver

In my spare time this weekend, I wrote a maze solving algorithm, which is reminiscent of a program I wrote as homework over a year ago, but slightly better. Its still wasteful in terms of efficient moves, but the improvements can come later. Here’s a snippet of some methods from it, for the curious:

    private Point findStart()
    {
 
        for(int y = 0; y < m_mazeNodes.length; y++)
        {
            for(int x = 0; x < m_mazeNodes[y].length; x++)
            {
                if(m_mazeNodes[y][x].getState() == MazeNode.SlotValue.start)
                    return new Point(x, y);
 
            }
        }
 
        return null;
    }
 
    public void solve()
    {
        Point start = findStart();
        solveRecursive(start.x, start.y);
    }
 
    private void solveRecursive(int currentX, int currentY)
    {
        if(m_solved == true)
            return;
 
        if(isValidLocation(currentX, currentY) == false)
            return;
 
        if(m_mazeNodes[currentY][currentX].getState() == MazeNode.SlotValue.end)
        {
            m_solved = true;
            return;
        }
 
        if(m_mazeNodes[currentY][currentX].getState() == MazeNode.SlotValue.visited)
            return;
 
        if(m_mazeNodes[currentY][currentX].getState() == MazeNode.SlotValue.wall)
            return;
 
 
        if (m_mazeNodes[currentY][currentX].getState() != MazeNode.SlotValue.start) 
            m_mazeNodes[currentY][currentX].setState(MazeNode.SlotValue.visited);
 
        solveRecursive(currentX+1, currentY);
        solveRecursive(currentX, currentY+1);
        solveRecursive(currentX-1, currentY);
        solveRecursive(currentX, currentY-1);
 
    }
 
    private boolean isValidLocation(int x, int y)
    {
        if(x < 0)
            return false;
        if(y < 0)
            return false;
        if(y > m_mazeNodes.length-1)
            return false;
        if(x > m_mazeNodes[y].length-1)
            return false;
 
        return true;
    }

Irans Twitterings

“U.S. officials say the internet, and specifically social networking sites like Twitter and Facebook, are providing the United States with critical information in the face of Iranian authorities banning western journalists from covering political rallies.”

“senior officials say the State Department asked Twitter to refrain for going down for periodic scheduled maintenance at this critical time to ensure the site continues to operate.”

Wow.