Ok, I just read one too many stories on wars on things that "kill" people. The most recent one was talking about a war on junk food. I'm not going to defend junk food as being reasonable, or even edible. What I have a problem with is the concept of looking at what's killing people and declaring war on it. What's next? The war on old age? That's just way too logan's run...
If we're going to go down this road then I say lets declare a war on life. As age increases the mortality rate of being alive approaches 100%. I think we can solve this whole mortality rate of life thing by just not producing any more. Just think about it. Every person that is not born doesn't have to die! We'll get planned parenthood onboard with this. It'll be great! If everyone stops reproducing it will also take care of this overpopulation thing I keep hearing about too. That solves even more problems. No birth means no death, and once we all finish this business of dying alone in our old age (no kids to take care of us) the environment will be able to go back to taking care of itself.
Now for the hard part... This requires a very passionate celibacy for all! Now, doesn't that sound exciting?
Now seriously, wars on things don't work. They just get funding. For some reason we equate a war with getting something done. Never mind if what you're doing is just hurting people by limiting their choices or by much more painful things like sending them to jail for doing something foolish in the first place. *cough* smoking pot *cough*.
My point? Lets let people mess up their own lives if they want to.
Shaun
Sunday, April 16, 2006
Monday, April 10, 2006
I'm weak
I think I have a Lisp problem. It started out so innocently. Just a little poking around here, a little reading there. Then I bought a book. I got a copy of ANSI Common Lisp last year and looked at it on and off. Later I started applying some of the interesting things I learn about in lisp to other languages. Then, Friday night, I ordered a copy of Practical Common Lisp.
I just can't leave it alone now. I keep wanting to play with lisp code. Then I want to start writing programs in Lisp. Sure I've got the REPL figured out, but that's not enough. I even started writing an IDE that provides multiple tabbed edit windows and a CLisp REPL on the bottom. I'm writing software to make learning lisp easier.
It doesn't help that this is the way I learned C. Playing a little here and there. Editing example programs. Suddenly I just was able to write programs as I thought of them. Now I'm expecting the same thing to happen with lisp.
I guess what I'm trying to say is... My name is Shaun, and I am a Lispaholic.
Shaun
I just can't leave it alone now. I keep wanting to play with lisp code. Then I want to start writing programs in Lisp. Sure I've got the REPL figured out, but that's not enough. I even started writing an IDE that provides multiple tabbed edit windows and a CLisp REPL on the bottom. I'm writing software to make learning lisp easier.
It doesn't help that this is the way I learned C. Playing a little here and there. Editing example programs. Suddenly I just was able to write programs as I thought of them. Now I'm expecting the same thing to happen with lisp.
I guess what I'm trying to say is... My name is Shaun, and I am a Lispaholic.
Shaun
Thursday, April 06, 2006
Real RAID
Have you ever been in a position where you might loose data and bits that are very important to you? When I was shutting down my Linux box for moving I found a kernel message saying there was an IDE bus reset due to a command timeout. I'm sure most people who read this will respond with something like "and your point is?". Basically, it's one of the warning signs that my disk might not want to be a disk anymore. It was thinking along the lines of paperweight...
I took swift action and thought about it for a month. I then ordered a 3ware RAID card and 2 120GB IDE drives and I will live in the happy land of RAID 1 Mirroring. This means that if one of my drives decides to go paperweight on me I'll still have my data.
The disk that I'm worried about has my CVS archive of all my interesting work I've done in the past. I don't know if I'll ever reuse the code, but I would like the option... It begs the question: How much do you care about your data?
Shaun
I took swift action and thought about it for a month. I then ordered a 3ware RAID card and 2 120GB IDE drives and I will live in the happy land of RAID 1 Mirroring. This means that if one of my drives decides to go paperweight on me I'll still have my data.
The disk that I'm worried about has my CVS archive of all my interesting work I've done in the past. I don't know if I'll ever reuse the code, but I would like the option... It begs the question: How much do you care about your data?
Shaun
Monday, April 03, 2006
Dating moratorium update (rant)
It's been 6 weeks since I lifted my moratorium on dating. The funny thing about that is that I haven't asked anyone out. I've been developing a bad habit. Since I've been enjoying the company of many of my friends I have become too worried to ask any of them out. I can think of a handful in my singles ward that I've kept from asking out on dates. I'm tired of not being able to enjoy someone's company anymore. Friends I have previously laughed with become distant after going on or even requesting a date.
There's a part of me that wishes everyone could just grow up. I mean this also for the other guys in the world that have trained the women I know to avoid the problem of not being interested. They become distant rather than just saying they're not interested. It would work if both parties could move on at that point. Our (everyone involved) inability to move on in the face of a declaration of non-interest is highly dysfunctional.
So, why is it that I really don't go on dates? It's not like I'm lacking the money; I just dropped more than I should have on RAID hardware for my personal server. I even have time for dates. There is something to be said about me being a goofball and an acquired taste. Some people just can't take undiluted doses of shaun.
I think I'm on to something with that last statement. There are many people I know who I will never be able to share a laugh with. There is usually a small courtesy laugh when they catch on that I'm trying to be funny, but they don't see what really is funny about what I'm saying. They will never appreciate that the nerdy shaun that they are acquainted with is part of a package that includes much more than odd quips and fits of giggling. Something that doesn't help is the fact that I meet many people when I'm on my goofball "A" game. They see me participating in advanced nonsense and don't ever see more than that.
I guess it comes down to me liking being liked. Though I'm not afraid to invoke the words of Cartman, "Screw you guys, I'm going home!". I still prefer to surround myself with people who welcome weird, nerdy, dorky, goofy shaun.
How does this relate to my dating problem? When I find friends who accept me I hate to risk creating a void between myself and them by inviting them to go on a date. This relates to a pre-existing difficulty in relating to people in general.
What I'm saying here is that if I had a way to find out interest without loosing the friends I enjoy I would be trying more. I've tried going the route of asking a lot of the women I know out and letting the odd gap form. I found myself alone and unhappy.
Here I am, no longer willing to risk enjoyable friendships with the possibility of enjoying more fulfilling relationships. The real kicker is that I know my current non-risking status is the WRONG answer. It's just that I value the people in my life so much that I hate to see them leave.
Shaun
There's a part of me that wishes everyone could just grow up. I mean this also for the other guys in the world that have trained the women I know to avoid the problem of not being interested. They become distant rather than just saying they're not interested. It would work if both parties could move on at that point. Our (everyone involved) inability to move on in the face of a declaration of non-interest is highly dysfunctional.
So, why is it that I really don't go on dates? It's not like I'm lacking the money; I just dropped more than I should have on RAID hardware for my personal server. I even have time for dates. There is something to be said about me being a goofball and an acquired taste. Some people just can't take undiluted doses of shaun.
I think I'm on to something with that last statement. There are many people I know who I will never be able to share a laugh with. There is usually a small courtesy laugh when they catch on that I'm trying to be funny, but they don't see what really is funny about what I'm saying. They will never appreciate that the nerdy shaun that they are acquainted with is part of a package that includes much more than odd quips and fits of giggling. Something that doesn't help is the fact that I meet many people when I'm on my goofball "A" game. They see me participating in advanced nonsense and don't ever see more than that.
I guess it comes down to me liking being liked. Though I'm not afraid to invoke the words of Cartman, "Screw you guys, I'm going home!". I still prefer to surround myself with people who welcome weird, nerdy, dorky, goofy shaun.
How does this relate to my dating problem? When I find friends who accept me I hate to risk creating a void between myself and them by inviting them to go on a date. This relates to a pre-existing difficulty in relating to people in general.
What I'm saying here is that if I had a way to find out interest without loosing the friends I enjoy I would be trying more. I've tried going the route of asking a lot of the women I know out and letting the odd gap form. I found myself alone and unhappy.
Here I am, no longer willing to risk enjoyable friendships with the possibility of enjoying more fulfilling relationships. The real kicker is that I know my current non-risking status is the WRONG answer. It's just that I value the people in my life so much that I hate to see them leave.
Shaun
Saturday, April 01, 2006
Finishing things up
A week ago I finished a software project I had worked on for the last 18 months. In my project I think the biggest things I learned were (in order):
I consider this to be somewhat of a professional milestone. Back when I was at century software I knew a little bit about writing code, but I wasn't nearly as good as the others I worked with. I pretty much learned how much of a programmer I wasn't. A couple of years later I was writing an internet filtering program for someone. I was able to get good portions of the code done, but ran into a problem when feature creep headed in the direction of advanced windows programming. I still have the DNS proxy/packet mangling code I wrote for that.
Now I stand at the end of a project for the first time. I can look back and enjoy seeing what I have made. What's even better is that I have developed into the kind of programmer that can just sit down and hack a utility together. If used properly that could be a pretty good metric for capability. What can you throw together with only a moments notice? Isn't that what coding contests are about?
Lets hope I can do more of these in the future. Though, I think working on a team would be nice. The later portions of my project really benefited from what I learned in the earlier parts. Being in a team would have helped me have access to people who could suggest different ways of doing things. In some cases I didn't figure out how to use some features until I stumbled across them in the docs while looking for something else. Using collections and lists comes to mind...
So what's the point? Coding is fun, realizing you're good enough to finish things is even better.
Shaun
- Using database triggers/functions in PostgreSQL
- Finding what I need in Microsoft documentation
- The proper use of transactions
I consider this to be somewhat of a professional milestone. Back when I was at century software I knew a little bit about writing code, but I wasn't nearly as good as the others I worked with. I pretty much learned how much of a programmer I wasn't. A couple of years later I was writing an internet filtering program for someone. I was able to get good portions of the code done, but ran into a problem when feature creep headed in the direction of advanced windows programming. I still have the DNS proxy/packet mangling code I wrote for that.
Now I stand at the end of a project for the first time. I can look back and enjoy seeing what I have made. What's even better is that I have developed into the kind of programmer that can just sit down and hack a utility together. If used properly that could be a pretty good metric for capability. What can you throw together with only a moments notice? Isn't that what coding contests are about?
Lets hope I can do more of these in the future. Though, I think working on a team would be nice. The later portions of my project really benefited from what I learned in the earlier parts. Being in a team would have helped me have access to people who could suggest different ways of doing things. In some cases I didn't figure out how to use some features until I stumbled across them in the docs while looking for something else. Using collections and lists comes to mind...
So what's the point? Coding is fun, realizing you're good enough to finish things is even better.
Shaun
Saturday, March 25, 2006
Political Standing
Last week at my caucus meeting I met Cliff Lyon. Bob mentioned him earlier this week. We had an interesting conversation. He suggested that I start or join a more politically oriented blog (probably not going to happen). Cliff also said he was interested in how I converted from being a republican to being a democrat. I think I'll share...
The first key, is that my political party is not my religion. This moots the term "Conversion". I switched because I had 2 options. One party that has a platform I agree with, but doesn't follow it to the extent that I disagree with the actions of its members. Or, a party that I may disagree with sometimes that actually sticks to its platform. I also believe I am in a better position to be heard and to be able to do things to get meaningfully involved in a smaller party.
I guess the moral of what I have learned is that if fewer people made their party their religion we would have better competition. Besides, the democrats aren't exactly perfect. They nominated John Kerry of all people when they had a fully operational Howard Dean sitting around.
I would like to say one final thing about confusing politics and religion. It happened in Germany. Having a leader that claims to be a Christian, but who does not act like a Christian is very dangerous. Continuing to vote for them, even more so. People ignore too many things that are wrong when they believe someone is a Christian. Lets take warrantless wiretaps. It's pretty easy to establish that they happened. The trouble is that we have to follow the rule of law. Let this slide and it won't be such a big deal that other laws are broken. I can't stand TV shows and movies about what the president does because those often show the president as being above the law. Bad move...
So here I am, Shaun the democrat. Lets just hope that whoever I back I don't become Shaun the oppressed. I see it coming plain as day so lets stop voting for people who abuse power in any level of government.
Shaun
The first key, is that my political party is not my religion. This moots the term "Conversion". I switched because I had 2 options. One party that has a platform I agree with, but doesn't follow it to the extent that I disagree with the actions of its members. Or, a party that I may disagree with sometimes that actually sticks to its platform. I also believe I am in a better position to be heard and to be able to do things to get meaningfully involved in a smaller party.
I guess the moral of what I have learned is that if fewer people made their party their religion we would have better competition. Besides, the democrats aren't exactly perfect. They nominated John Kerry of all people when they had a fully operational Howard Dean sitting around.
I would like to say one final thing about confusing politics and religion. It happened in Germany. Having a leader that claims to be a Christian, but who does not act like a Christian is very dangerous. Continuing to vote for them, even more so. People ignore too many things that are wrong when they believe someone is a Christian. Lets take warrantless wiretaps. It's pretty easy to establish that they happened. The trouble is that we have to follow the rule of law. Let this slide and it won't be such a big deal that other laws are broken. I can't stand TV shows and movies about what the president does because those often show the president as being above the law. Bad move...
So here I am, Shaun the democrat. Lets just hope that whoever I back I don't become Shaun the oppressed. I see it coming plain as day so lets stop voting for people who abuse power in any level of government.
Shaun
Tuesday, March 21, 2006
Lambda Epiphany in C
Today I realized that C can get Lambda like behavior. I wrote the following code:
#include <stdio.h>
int main(void){
int val = 4;
int lambfunc(int innerval){
return innerval+val;
}
int i = 2;
printf("lambfunc(%i) = %i\n",i,lambfunc(i));
return 0;
}
It gave the following result:
lambfunc(2) = 6
The significance of this is that I was able to write a function in a function that made use of variables in the scope of the function. What was really cool is when I added the nestlamb() function:
#include
int nestlamb(int fn(int)){
int value = 6;
return fn(value);
}
int main(void){
int val = 4;
int lambfunc(int innerval){
return innerval+val;
}
int i = 2;
printf("lambfunc(%i) = %i\n",i,lambfunc(i));
for(val = 0;val < 5; val++)
printf("nestlamb(lambfunc) = %i\n",nestlamb(lambfunc));
return 0;
}
What's really cool about this is that I have a function (main) that has a function in it (lambfunc) that uses variables in the local scope. When I go through the loop calling nestlamb() passing lambfunc I call it 5 times with val ranging from 0-4. nestlamb(lambfunc) returns values 6-10. This means that nestlamb uses the changing values in the scope of main. I managed to do this by passing the pointer to lambfunc instead of passing the return value from calling lambfunc(). This passed the pointer to the instance of lambfunc() that exists on the stack. Subtle difference with a powerful result.
Some things to remember when doing this:
All things considered, this is really cool. I'll be writing some very interesting code in the future. The ability to declare a function on the stack is very interesting to me.
Shaun
#include <stdio.h>
int main(void){
int val = 4;
int lambfunc(int innerval){
return innerval+val;
}
int i = 2;
printf("lambfunc(%i) = %i\n",i,lambfunc(i));
return 0;
}
It gave the following result:
lambfunc(2) = 6
The significance of this is that I was able to write a function in a function that made use of variables in the scope of the function. What was really cool is when I added the nestlamb() function:
#include
int nestlamb(int fn(int)){
int value = 6;
return fn(value);
}
int main(void){
int val = 4;
int lambfunc(int innerval){
return innerval+val;
}
int i = 2;
printf("lambfunc(%i) = %i\n",i,lambfunc(i));
for(val = 0;val < 5; val++)
printf("nestlamb(lambfunc) = %i\n",nestlamb(lambfunc));
return 0;
}
What's really cool about this is that I have a function (main) that has a function in it (lambfunc) that uses variables in the local scope. When I go through the loop calling nestlamb() passing lambfunc I call it 5 times with val ranging from 0-4. nestlamb(lambfunc) returns values 6-10. This means that nestlamb uses the changing values in the scope of main. I managed to do this by passing the pointer to lambfunc instead of passing the return value from calling lambfunc(). This passed the pointer to the instance of lambfunc() that exists on the stack. Subtle difference with a powerful result.
Some things to remember when doing this:
- lambfunc() must only be passed to other functions. Never return it!
- C has static typing. This still isn't going to be as flexible as things like using (map (lambda) ...) in lisp.
- You can't declare a lambda and use it in one expression. First you define it, then you use it.
All things considered, this is really cool. I'll be writing some very interesting code in the future. The ability to declare a function on the stack is very interesting to me.
Shaun
Subscribe to:
Posts (Atom)
