Friday, October 30, 2009

Tech: Daylight Savings Time in Javascript

This is another one of those computer programming centric posts I'm doing. I spent the last day and a half trying to find a good way to handle this, and I'm somewhat happy with my solution... so I'm sharing it. I'll post code, so I'm basically saying that if you want to use it, go ahead.

Let me start though, with the situation I needed to resolve. The application I'm working on is something that allows a user to schedule recording times... kind of like TiVo, but not for general Television... the source of the video is something else. Not important. The thing to understand is that it lets a user pick a time through a web application in "local time", "server time", or "UTC".

Since the client machine doesn't know what time it is on the server without the server telling it, I pass the offset from UTC... since everyone knows what UTC is. The problem I was dealing with was when the server and client are in different timezones to begin with, and daylight savings time occurs. If the server is in a timezone before the client (for example), what ends up happening is that when I pass the client my UTC offset, and daylight savings switch happens on the server, but not on the client, the client thinks the server is one hour different from what it actually is... until the client goes through the switch too, and then everything is back to normal.

It's a pain the ass. I hate daylight savings time.

So the idea to solve this problem was to figure out whether the offset was being passed as a standard or daylight savings time, and then to figure out if the client is in the same time (daylight savings or not). If they're different, I need to adjust by one hour, but if they're the same, I can just keep doing what I normally do in the code.

On the server side, I get to use C# (C Sharp for the search engines), and there it's easy: "DateTime.Now.IsDaylightSavingTime()". Really easy... and I can just pass that to the client side in a hidden input.

Now the client side. Javascript is pretty awesome for most things... but it is lacking a simple method or property to give me a boolean response about whether the date/time I'm looking at is in daylight savings or not. I found all sorts of methods online to tell me when daylight savings would shift, but zero methods telling me if a specified Date object held a date/time in daylight savings or not. And the problem only exists for that one hour where we set the clocks back... because it means that a given time occurs twice on the same day. We have 01:30 twice... and knowing which 01:30 becomes important if you're deciding whether to start or stop a recording in that time.

I'm ashamed to admit this, but it took me a while to figure out that if you just write out the date object without using any of the Date object's "to" functions, it includes the current timezone. In my case it was showing "EDT" which of course means "Eastern Daylight Time" (On the east coast of the United States. I guess there's another EDT in Australia). I looked into this a little further to see if it might be as simple as contrasting it with "EST" (Eastern Standard Time). I found out that Internet Explorer (at least in IE 8) is not following W3C Standards for how to output that information. It's supposed to spell out "Eastern Daylight Time". The standard would make things easy... because I could just the "toTimeString" function and search for the word "daylight".

So, I had to keep looking for a solution so I could make sure it works in IE. I decided to look up the list of time zone abbreviations... and what I found lead me to believe that if the timezone abbreviation includes the letter "d", it is a daylight savings time date/time. Well... except for what the website calls a military time zone, and one of them is called "delta"... abbreviated "d".

I had my solution. I test for the browser; If it's IE, I parse out the abbreviation, make sure it's longer than one character long (just to be sure to avoid that military time zone), and make sure it contains the letter "d"; If it's any other browser, I just search the toTimeString for "daylight".

Seems kind of simple now, and I'm wondering why I didn't stumble across anything like it in my google searches. Anyway, in an attempt at getting a solution out there on the web... and in hopes that google will find the page and lead other people here, I'll include the code...

First, a simple function for determining browser...

function isIE()
{
return (navigator.userAgent.toLowerCase().indexOf("msie") > -1);
}

Second... the daylight savings time test...

function isDaylightSavingsTime(theDate)
{
var theTime = theDate.toTimeString().toLowerCase();
var isDST = false;
if (isIE()) //do the IE based code for determining whether it's daylight savings time or not...
{
if (theTime.length > 9)
{
theTime = theTime.substr(9); //trim off the time so we just have the time zone
if (theTime.length > 1 && theTime.indexOf("d") > -1)
{
isDST = true;
}
}
}
else //handle W3C compliant browsers
{
if (theTime.indexOf("daylight") > -1)
{
isDST = true;
}
}
return isDST;
}

There might be more efficient ways to do it, but it works, and it's not THAT complicated. I hope this is useful for you. And I apologize but making the indentations right for the code samples is making my headache worse... so I'm leaving them as is. I'm sure you can forgive me that.


Wednesday, October 14, 2009

Did I meet someone? Really?

Today is Wednesday. Last Saturday I met a girl. And I'm crazy about her. I'm not sure I've ever really meant "crazy" literally though. I find it a little scary how much I like her after knowing only a few days, and only a few hours in person. Let me tell you a story. Don't worry... it's only a few days... how long a story can it be?

It starts with a little background. I think I have a sinus infection. The most prominent symptom has been the sinus pressure and therefore the headaches. I missed work two days last week for this, and I have a doctor's appointment to check it out coming up. So I've been dealing with this headache that waxes and wanes for about a week now.

Saturday was no different, except that I needed to be okay so I could go to a wedding for a close friend of mine. Before I even left for the wedding (it was at 10:30 AM) I had my triple dose of "vitamin I" (Ibuprofen for the uninitiated). So as you can probably imagine I wasn't in the most cheery of moods. Part way through the wedding, I took a fourth dose. I was smart and brought a bottle of the ibuprofen with me. Of course, some of you may know that the bottle for ibuprofen tells you to not take more than 4 doses a day. I was at 4 doses by noon. And yes... I had to take a 5th dose before the end of the reception.

Because of my rough state, and my track record for not meeting people even in the most favorable of circumstances, I assumed I wasn't going to meet anyone at this wedding either. But there was one girl there... she caught my eye. Of course, if you don't know me (and are for some reason reading this blog), I am shy. Stupidly so. Even when I manage to overcome it, I tend to falter, and nothing intelligible comes out of my mouth, so I tend to just sit there and do nothing. Which is exactly what I did. But my friends at the wedding had other plans.

When the last dance rolled around, the bride demanded that everyone get up to dance... it was a paired dance... so I was going to ignore her. But she pointed me out and paired me off with this girl I had noticed. So we danced the last dance together. I didn't even know her name at the time. And I was nervous as hell. As a side note: I hate that I get so nervous. It's irrational. You could possibly classify it as a phobia.

Last dance ended, the reception was over, and there was an after party to go to. A good sized group of us (15 or 16 people I think) went into Boston to Dick's Last Resort. The guys all had tuxedo shirts on, the women had their dresses on, and the bride had her wedding dress on. It was pretty awesome how much attention you can get by wandering around Boston in a wedding dress, though I think it would probably work differently if I tried that.

Anyway, it was loud in there, and shouting was the only way to be heard. I have damn good hearing, but I don't pick out words as well as I pick out the simple presence of sound. So I'm not a fan of these loud places where you can't really talk to people. This girl who's name I still didn't know was sitting almost across the table from me. I think we shouted a little... you know... in a nice way... but it wasn't much real communication.

After Dick's Last Resort we went to a place called "The Hong Kong". Since the place is a dive, I'll assume no one knows what it is. It's a bar with a dance floor, and collection of the most frightening guys I've ever seen. They had nice shirts on, styled hair, an air of confidence, and stares that would make me uncomfortable if I had been one of the girls there. These guys did not strike me as the kind of guys I'd enjoy having a conversation with. They were like vultures. They were circling. It was creepy.

But I'm off topic. Anyway... I was dragged onto the dance floor again. I'm not a huge fan of getting on a dance floor. I don't think I'm good at dancing, and I've already mentioned the shyness thing. Put me in front of a computer, and I'm as comfortable as can be. Put me in front of people and make me do something I think I'm not good at... well... I get nervous.

But the girl (who's name I still didn't know)... danced with me. Now the group was all on the dance floor. Everyone seemed to be having a good time, and the ladies were dancing up a storm... they were really impressive, and I mean that in terms of skill level. They really seemed to have a knack for dancing.

Now I have to clarify something else about myself. I'm shy AND oblivious. I don't notice when women show interest in me. At least, this is what my friends tell me. I think they're making it up, but that's another topic. Assuming they're right, and I really am bad at noticing when women are interested, I wouldn't normally notice what was happening on that dance floor. The girl (I'll tell you her name at the point in the story where I learned it) was dancing with me in ways that figuratively knocked my socks off. She was amazing. It stunned me. And I found myself wanting more and more to be close to her. Even through my hazy awareness of social reality, I came to believe she might actually be interested in me. And I was real happy about that.

The night wore on, and eventually it was time to go. We all headed outside into the chilly night, and stood around trying to recover our hearing (it was really loud in that club). And for the first time that night I saw something that hurt my interest in her. She smoked a cigarette. I am not a fan of smoking as you may know if you read that earlier post of mine in this blog about smoking. And normally if I see a girl smoke, it's an immediate deal breaker. I completely lose interest. At that point in the evening, I just walked away and talked to someone else in the group. I didn't want to smell or breathe in the smoke. But somehow... I didn't lose interest. I still can't explain it, but I was still interested in her.

At some point in the evening I found out that she would be leaving the next day to go back home. And it was some place far away. So my hope was hit pretty hard at that piece of information. It meant she'd be far away, and even if we got along great that night, she'd be far away, and there would be no chance for us to spend any more time together. When the evening was over, and everyone was heading home, I figured it would just end up being a memory for me. Something to look back on and wonder about. I was sad, but not surprised considering my luck.

My memory of the rest of the evening is a little hazy. I had had a few drinks over the course of the roughly 12 hours, but I think my memory is hazy because I was just tired at this point. I think the bride and groom approached me after the girl separated from the rest of the group to head to where she was staying. The bride and groom informed me that she had liked me. And this was the moment I found out her name. They told me Tricia was interested, and I remember my response being something along the lines of: "oh so that was her name..."

When I got home an hour later, the groom asked if it would be okay to share my phone number with Tricia. Tricia asked the bride for it. I eagerly said yes, though I have to admit I was wondering if that meant I was getting a phone call at 1AM. That's what time it was. But it wasn't a phone call... it was a text message. And we started texting back and forth... until about 2:30. I think it was then that I found out she has a 9 month old daughter.

She smoked. She lives 600+ miles away. And she has a daughter. I think it was during that text conversation that I found out she's in the military too. She's served two tours, and is going back for another. Don't get me wrong. I highly respect the military. But this would be one more thing that's keeping us from spending time together.

Normally, a guy meeting a girl with a kid already... well... that's a big important thing and it does require some thought. I'll get back to this point later in this hugely long blog.

Even with all the obstacles and the important topics to consider, I knew I really liked her. It was crazy how much. But I was steeling myself for the probability that nothing would come of it. There were just so many obstacles.

The next morning (and I woke up at 6:00AM despite my best effort to go back to sleep) I got a text message from Tricia. She asked me to go see her off. This would be a 40 mile drive, and the time she gave me lead me to think I might not make it... and the bad part about this is that I was rationalizing it in my head. I was convincing myself to not even try to make it. And then it hit me. That's how I live my life. I never take chances, and I live in my comfort zone. Motivating me to leave my comfort zone is a difficult thing. But in this case... I knew I wanted to see her again... and I knew it might be my last chance. I hopped in my car and I drove. I sped. I actually got out of my own way and drove. Maybe it doesn't seem like much to a reader of this post, but to me... it was an important moment in my life. It was a moment where I finally fought through one of my weaknesses... I won. And I was doing it because of this wonderful girl I had met.

And in case I somehow managed to create tension... to make you wonder if I made it or not... She was running late, and needed to get a meal anyway. So we ate at the Cheesecake Factory in Burlington. Unfortunately, since I had gotten up so early, I had already eaten a big meal... so I feel guilty, but I didn't eat much at the CF. I think I still have the leftovers in my fridge from there. Anyway, we got to eat a meal together, and it was probably the first period of time where we could talk that wasn't full of ambient deafening sound. It was really nice, and I was excited to have had the chance to spend more time with her.

I guess I should mention that she and her friend were both there. Tricia was giving her friend a ride to the airport, and then Tricia was going to be driving home... From Massachusetts to Ohio. Just so I'm not being a jerk by leaving her out entirely... her friend is a really good person. Great stories, very friendly, and she made it easy for me to feel comfortable.

So Tricia was facing an 11 hour drive. Alone. Now I'm not a fan of driving at all. I complain about my 30 mile commute to work. And driving for that long (600+ miles) alone is not something I'd be happy about. She called me near the beginning of her drive, and we talked. I'm not even sure I can recall everything we talked about it. Aside from a pause to eat dinner, we talked for her entire trip.

Something else you might need to know about me to appreciate this part of the story: I hate talking on the phone. Hate it. When people call me for a reason other than making plans and that take longer than 2 minutes... I start trying to find excuses to get off the phone. I don't want to converse on the phone. It's a compulsion. And if I can avoid it I won't talk to strangers on the phone. Calling a doctor's office to make an appointment is unpleasant to me. Telemarketers annoy me greatly. There are exceptions. My brother being half way around the world... I'm willing to talk to him on the phone for as long as he likes. Just an example, and as you can have already read, I talked to Tricia for probably 8 or 9 hours that day... and by "that day" I mean last Sunday. "That day" makes it sound like it was years ago.

I'll admit that part of my motivation was because I was worried about her. I didn't want her falling asleep on the road. But the idea that I would be capable of participating in a 9 hour conversation with someone I just met over the phone is mind boggling to me. I must really like this girl.

And now I'm back at work... and we have been keeping in touch with email, texts, and phone. I've talked about buying her a plane ticket to come visit with her daughter so I can meet her too. I've talked with friends about this... wondering what's going on because honestly, I'm a little scared and confused. How can I have such strong feelings for someone I met four days ago? Am I ready to take something like this seriously enough to take on the responsibility of helping to care for a child? How do I be part of a relationship when we're so far apart? What happens when she gets deployed again? Should I try to get her to move in with me? How did I go from being hopelessly single to wondering these things in a weekend?

Here's another tidbit about me. I tend to analyze everything. I think things through so much that it's often detrimental to me. So I've been thinking about her pretty much non-stop since we danced at that little club called the Hong Kong. I'm worried that I might mess something up because I'm trying to apply logic to a feeling.

So that's where I am. I know I like her a lot. Some of the similarities between us are just too good to be true for me. I'd go into some of them now, but this post is getting real long. Just trust that some of the things she's said have surprised me in very good ways. And I'll leave it to you readers to wonder what might happen. It's still really early. And I don't know what might happen either. But I know right now as I type this that I hope she and her daughter will be part of my life. I hope I'm ready, and I hope I don't mess anything up.

Tuesday, October 6, 2009

Tech: ASP.Net annoys me sometimes

I apologize... this post is going to be pretty computer programming centric. For those of you who read this post, and who don't know me personally, I am a software engineer. My job is primarily done with WinForms and C#.Net. But there are projects that lean toward my roots which is web technology. Right now I'm working on a web application that I shouldn't say too much about, but which has become a source of frustration.

How? Well... it's written with ASP.Net.

Prior to ASP.Net, if you wanted to stick with microsoft technology, and you wanted a highly interactive webpage, you used HTML (basis of all web pages), ASP, and Javascript. Each piece handled it's own area of expertise. HTML was the set of tags that told the browser what to show and how to show it. Javascript was the client side script code to handle things like field validation and to update stuff on the page without having to make a request on the network to the server for more info. ASP handled the server side stuff including talking to databases and so forth.

ASP.Net though... they seem to be trying to take responsibility for all the roles the other things used to take. Now, ASP.Net is trying to write all that other code for you. You have drag and drop components that try to do things for you, but in the process they limit your ability to use the other tools effectively. And on top of that, it's not even efficient code. So it does make some things easy, but it murders your web site performance, and limits your ability to do what you need to do in some cases.

An example: ASP.Net provides an "update panel" that is supposed to leverage Ajax technology so you can update sections of your webpage without doing a full page request from the server. The idea is that if you ask the server for small bits of information and just change the page the user already sees, you can improve performance since the computers and network do less. It's a great idea, and the ASP.Net Update Panel does make it easy to implement... you don't have to write any Ajax code or even know what it is. But it's such a crappy chunk of code. It doesn't give you the performance benefits because in the background... it's STILL DOING THE FULL PAGE SUBMIT. You aren't passing just a small chunk of information to the server... It's like using a nuke when all you needed was a bullet, and yes... the nuke in this analogy still destroys everything around it despite only wanted to shoot one target. It's annoying.

Fortunately, you can just write your own Ajax code, and have it work fine.

What I'm dealing today, and probably for the next few days, is figuring out why ASP.Net won't let me use javascript to update some form fields and still get the data to the server side so I can store it in the database. It's as though if you don't use the officially sanctioned ASP.Net method to accomplish something, it won't let you do it. Which is horrendously stupid, and massively offensive that microsoft would code it that way. I can only imagine ASP.Net is aimed at people who don't know much about web code, and aren't looking to do anything complicated... where "complicated" really means: "things microsoft didn't anticipate". And honestly, I can do most of the things ASP.Net controls do, but better.

So why did I use ASP.Net in the first place?

I didn't. I wasn't in charge of this project at its inception. And the guy who was is a back end programmer. Doesn't even like working in winforms UI... Prefers the business logic layer and the database. And he's damn good at it. But he got tricked when he got hired here and got through into a UI intensive web application project. And with ASP.Net, he successfully built the app. The problem is that as the app grows, and since he left the company, ASP.Net is no longer capable of giving us what we need. And I'm stuck on this stupid bug that doesn't seem to have a solution.

So I guess this post is about venting. Maybe it's also a warning. Web programmers using a microsoft base (which is fine. I like ASP... just not ASP.Net), should strongly consider using basic ASP, and writing their own controls. Don't use master pages. Don't use the built in ASP.Net controls (a "label" is just a span... you can write a span can't you?). Don't use repeaters (If I believed in a god I'd say "for the love of God don't use repeaters").

You'll end up with a far better application that is far better capable of dealing with new needs down the line.

Wednesday, September 23, 2009

The JP Morgan Corporate Challenge, through my eyes... er... words?

This is something I posted on Facebook (26 June 2009). I'm reposting it here because I rather like it, and I need to keep reminding myself. So I hope it's something you folks out there on the internet find interesting...

==========================

Last night I ran in the JP Morgan corporate challenge. Well, I jogged. Okay sometimes I walked, but mostly I jogged. I did the 3.5 miles in 44 minutes. That's roughly 12.5 minute miles. My legs and feet were fine. I'm not sore today. It's my cardiovascuar endurance that was the killer. I'm working on it though, and will continue to work on it. Anyway, to get to the bullet points about my experience with the JP Morgan Corporate Challenge.

BAD: I parked in Sommerville near the Davis T Stop. I've grown to hate Sommerville. What a horrible city. One way streets, bizarre intersections, signs everywhere that don't tell you where you are or how to get where you want to go... just that you can't park there... and I hope to never have to drive through or park in Sommerville again. It doesn't help that the parking lot had those parking meters that only take quarters. I had two quarters... good enough for an hour. A friend had more quarters but the meter was broken or something and only went up to an hour. I couldn't move to another meter because I had no more quarters. I got a $20 parking ticket.

GOOD: I like riding the T. There are always interesting people to see. I find myself wondering what story explains the facial expressions of other people on the train.

GOOD: The race itself was fun. I'm not a huge fan of the crazy crowd (there were 12,000 people running in the race), but it was interesting. The other people served as motivation for me. The biggest motivation was the guy with one leg on crutches. He was ahead of me at the beginning, I caught up to him at a point where I desperately needed a breathing break, so I walked behind him for a bit. Of course there's the comedic "Holy crap, the guy on crutches is ahead of me in the race", but really the more important thing is that that guy was awesome. I think I take my own health for granted too much. I know I'm out of shape, and recently I've been trying to do something about it, but I'm not in good shape yet. And of course as I was running and then taking that break, the thoughts of doubt and desire to quit are running through my mind. When I saw the guy with one leg on crutches doing a 3.5 mile run through Boston... it really helped me. Anyway, the race was really a great experience. So many people just getting together to run. I don't even care that it was a charity event. Seriously, how does my running 3.5 miles help any charity? I paid $40 to participate, and I understand how that helps the charity... but couldn't I have just given them $40? Oh well... like I said, the race was a lot of fun, and I'm glad I did it... even if it was humbling.

GOOD: Going out afterward to get some food and a drink with the coworkers/friends I ran the race with was nice too. We may have been a little sweaty... but the company was top notch, the food was pretty good, and that Jameson-in-Coke was delicious. Of course I should have skipped the alcohol entirely. Being somewhat dehydrated from the run, and then drinking something that requires water for the body to process. I woke up this morning with the worst headache I've had in weeks (I get a lot of headaches). But still I'm calling this part a "Good" part of the experience. 2.5 times the normal dose of ibuprofen did the trick for that headache.

BAD: Travelling home was not my favorite part of this. Finding my way out of Sommerville (CURSE YOU SOMMERVILLE!! I WILL HAVE MY REVENGE!!), was tricky. I know I'm looking for 16 and route 2. But my iPhone GPS doesn't tell me what direction I'm facing, the previously mentioned crappy signs in Somerville were no help at all, I was stuck on one way roads for the first couple turns, and so finding route 16 was a good 20 minutes of driving so I could see where on the little iPhone map I actually was, so I could figure out what direction I needed to go. Then of course there was the hour long trip back home. I was pleasantly entertained by the lightning storm that was happening... that part was good, but I was tired, sweaty, and I knew I'd need a shower before going to sleep, which would keep me up longer... I wasn't so happy about the drive home. Not that it'll save me on time, but I will always go to Alewife now instead of Davis.

GOOD: The experience in general was a good one. I got to run with 12,000 people, including some really great people from my office. I got to go out in Boston afterward to the Black Rose, and enjoy some conversation with those same people (not the 12,000...). And I got to be shown again that my physical health is not something I should take for granted. Sitting in front of a computer as my job is fine, but typing at a keyboard can't be the only physical activity I get in a day.

That's it. That's what I took away from this experience. I recommend it to everyone. And I do mean everyone who is capable of moving under their own power. The fastest guy did it in about 20 minutes or something. I did it in 44. And there were people who walked the course and did it in over an hour. It's not about getting the fastest time. It's about doing something that will remind you that your health is worth fighting for.

Wednesday, September 16, 2009

Over 1 Billion Hungry People

EDIT: Oof this didn't age so well. This was still a conservative minded post. Not having any interest in helping anyone. And I was so callous writing that. I'll still leave this post here so I can look back at it, but I care about people now. And I recognize that this problem of people needing charity is the direct fault of the super-rich who keep too much of the labor value of their employees and cause poverty. And sometimes, people just need help. Wow was I wrong.


http://www.reuters.com/article/topNews/idUSTRE58F1MJ20090916?feedType=RSS&feedName=topNews

So there's the brief news article. In case the link is broken later, the article basically says that the UN relief organization doesn't have enough money to support the 1 billion people who need it.

This issue caught my attention because I'm not sure I care. Don't get me wrong. I feel bad for individuals who suffer, and I certainly don't want to cause suffering, but doesn't this situation strike anyone else as wrong? And by "this situation" I mean the one where 1 billion need to be completely supported by charity.

Why aren't these people doing something to survive on their own? What causes them to need support for their entire lives? Are we doing anything to get these people to a point of self sufficience? Or have we basically created 1 billion people who require total support just to survive?

I'm fine with the idea of helping people to get back on their feet, or to learn how to stand on their own to begin with, but I'm not okay with parasites. Life is a struggle that makes you stronger, and these people are just (apparently) not doing anything at all. They sit back and wait for someone else to take care of them. Sounds a bit like our welfare system, but that's another post entirely.

So to sum up: I think we need to get to a point where 1 billion people aren't in need of charity... where those 1 billion people can take care of themselves... farm... whatever it takes. And I'll just lay it out there... if people die... that's okay. That's a possible outcome of trying to live. If I died because I couldn't take care of myself... that's just nature... it's the nature of living. Like I said before, I'm okay with helping people become self sufficient, but not with supporting people indefinitely. The strategy needs to change, for their (the starving people) sake more than ours (the people who can feed themselves).

Tuesday, August 18, 2009

Creationist "Museum"... what?

Here's a blog post I just have to share...

The author of the post sounds like someone I'd enjoy talking to. The post is about this Creation "Museum", and about how it's not actually a museum. So I'm just sharing it here, both so I can find it again later, and so you few people who read this blog might see it. The post is not as long as the scroll bar implies by the way... lots of comments at the end of it.

Tuesday, July 28, 2009

A follow up to the exorcism post

Hello again to anyone who reads this blog. It seems I'm focusing quite a bit on religion and how much I'd like for it to go away. Sadly there are people who insist that their religion is "true" in spite of an overwhelming lack of evidence, and in spite of the fact that there are so many mutually exclusive religions that claim to be the one true one. They were all written by people. Some of them just appealed to enough people that they lasted.

Anyway, I wanted to address something from my last post about the church that performed an exorcism to "help" a teen boy stop being gay. It's still infuriating, but the person who responded and deleted his two comments did mention something I have to correct my assertion about. Apparently, as of when I did my reading, homosexuality is not necessarily a biological trait. It supposedly can be, but isn't always. Or something like that.

But when I thought about it... I realized it really doesn't matter if it's biological or not. What right did those people in that church have to impose their way of thinking on that boy? The boy wasn't hurting anyone (to my knowledge). It's persecution. It's morally wrong what they did to that boy. One of the touted traits of this country is freedom of religion. And that's great. It's a protection against one group of people telling another group of people what to think. Having a different sexual orientation is a bit like religion in that respect. But for some reason the religious zealots from that church are allowed to mistreat a young kid in a way they would be furious over if done to them. If I went to their church, tied them up, and forced them to listen to me spout on about how their socially acceptable imaginary friend for adults (and by that I mean their god) is a farce that isn't any more likely than the flying spaghetti monster (I've linked it before... easy to find on wiki), they be pissed off. How can they be so hypocritical?

My guess is because their faith tells them that they're "right", and that the exorcism was a good thing where my explaining why their god doesn't exist is a bad thing.

I have friends who have deep faith that their religion is the "truth". I'll never understand why. Faith to me is something built up over time based on experience. I have faith in my parents, my brother, and my friends. I believe that if I was in trouble these people would help me. I know that I would help them. But I can't prove they would help me without it actually happening... so it's faith instead of knowledge. But having faith in a religion... in a god that has no better chance of existing than a levitating pasta creature... It makes no sense at all. And then to let it guide your actions like those people in that church did... That's what scares me about religion. Even if they are based on something that a goat herder made up thousands of years ago, people seem capable of believing strongly enough to let it make them do stupid things.

I think I understand why people want to have faith. If you believe in some powerful being that for some reason cares about what happens to you, and that everything happens for a reason, suddenly life isn't so hard. Things will work out. You don't have to worry. It's a comfort.

I just can't do it. Part of me wants to have faith in a higher power because I crave that kind of comfort too. But there's nothing in my life that has ever given me reason to even suspect that there is a higher power... except what religious people say, and that barely counts because they are just people... people who believe... and they don't have evidence either.

I'm definitely wandering around in this blog post. Sorry for that.

Thursday, July 2, 2009

Exorcism? Of a biological trait? Seriously?

I'm having trouble starting this blog post. So I'll just give you the link...


This is the kind of thing that makes me think humanity is doomed. If I'm not mistaken, the majority of people are religious. What I wonder is about how many of them are as obscenely stupid as the people of the church in that article.

In case the link is broken, the article talks about an exorcism done at a church. There's even a video. And they were exorcising the "gay demon" from a teenage boy. He apparently goes into convulsions, pukes, and can't stand on his own. They cover him with a white sheet. At some point a woman yells to rip the demon from his throat.

WTF?

I just... I mean... how do these people function in society? I'm writing an angry letter to Darwinism to complain about the fact that these people haven't successfully died out yet. If you've read my anti-religion posts, you know I'm already not a fan of religion. But these people... they believe in exorcism... on top of that they believe that homosexuality is a demon that possesses a person... and they think that they can get rid of this demon so the kid won't be gay anymore. This also means they believe in their religion so fervently that biology is lost on them. And the worst part is that they think they're doing something "good". That poor kid.

I'm trying to imagine the rebuttles I might get if anyone actually read this blog. But if there's a logical or reasonable oppositional argument to my assertion that these religious freaks (the ones in the article and video) are stupid, evil, and/or seriously negatively impacting their community, I don't know it.

I want to say that I believe everyone should be able to believe what they want. But this is really putting that belief to the test. I suppose, when you cross the line into hurting someone... like these people did (and apparently do regularly according to the article)... the people of that community need to have some kind of intervention to teach those religious nut-jobs that they're being stupid.

Sorry. Examples like this... well... they get to me. And I really wonder if there's anyone out there on the internet that would actually defend that awful behavior.

Monday, March 30, 2009

Everything Happens For a Reason

"Everything happens for a reason" is one of those phrases you hear a lot, and it seems to be a means of finding comfort. In that way it's a lot like the concept of a god. In fact, if you believe that saying, you must believe that there is a conscious force behind everyday occurences.

Let's imagine a hypothetical scenario where you step on a rusty nail, and it makes a hole right through your foot. Now you have a nail stuck in your foot. Removing it yourself is generally a bad idea as you tend to bleed faster when you remove the puncturing implement. You know you're gonna have to get a tetanus shot. This is an unpleasant situation.

But everything happens for a reason right? Maybe you end up meeting your future spouse at the hospital. Maybe you end up missing a really lame social event because of the injury and are happy for that at least. Maybe you're just a horrible person and the reason is that you deserved it.

But all of those possibilities assume there's a "greater power" at work planning this crap out. Lacking any evidence of a god, it makes no sense to say that everything happens for a reason. Even if you did meet your spouse because you stepped on the rusty nail... there was no reason behind it. It's called a "coincidence".

"I forgot my cellphone at home, two of my tires blew out, and I had no way of calling for road side assistance. It was really a big problem to get someone to stop and lend me their cellphone. But I guess everything happens for a reason right?"

No.

Of course, you can say that some things happen for a reason. But those things are the events that occur as a result of the actions of a thinking being.

"I can't walk right now because a thug shot me in the left leg."

Yup... it happened for a reason. That thug consciously pulled the trigger and shot you. And their reason might have been that they wanted to hobble you, kill you, or maybe they hit you by "coincidence" and they were just pulling the trigger because they wanted to. That's the reason. It might be a stupid reason. It might not have any greater purpose.

To then assign it any greater purpose is solely a construct of the mind. You can decide it has meaning, but that doesn't mean it actually does. "God let me get shot so I'd understand pain and the struggle to get back up on my feet," doesn't work. You can decide how to deal with the situation, and you may come out stronger. That's your choice. Not the plan of some manipulative being.

That's it. That's my rant for now. I suppose I should just stop trying to tear away comforts... people deserve to delude themselves a little now and then right? I guess. I choose otherwise.

Wednesday, January 28, 2009

Missed Opportunities

Years ago, maybe almost a decade now, I spent a lot of time and money at a place called Boston Billiard Club in Nashua. One of the defining characteristics of this place was (probably still is) beautiful waitresses in little black dresses. This is probably why I spent so much time and money there. Don't get me wrong... going with friends was fun in it's own right, but I do often lament how much money I spent there.

And of course, I had interest in various waitresses there. I became a regular. They knew me by name, and I'm told that management had a meeting about me and one of my friends who was there with me most of the time, also spending lots of money. Management wanted to make an effort to keep the girls from fighting over who got to have us as customers because we were so well known there... for spending way too much money. When I first hear about it... it felt sort of good to think the waitresses there would fight over having us... but now it seems sort of sad to me that it was about how much money was being spent there.

Anyway, hopefully that lesson got learned.

So there was one waitress there that I was very interested in, and who I of course said nothing to about my interest in her. Okay, so there were several waitresses I was interested in over my time going there, but the story is about this one.

After I stopped going there, and I think at least a year went by, I saw her again. She was working somewhere else, and she remembered me. And she seemed happy to see me. I was there with some relatively new coworkers for lunch, and she was waitressing there. She hugged me and of course my coworkers were amazed and impressed. The icing on the cake was that she gave me her phone number and told me to call her. I talked to her alone for a few minutes there, just to catch up a bit, and found out she was living with her boyfriend.

This is where we'd insert the screeching sound of brakes being applied vigorously.

So I left that day with nothing but confusion. And I never called. I mean... maybe she was interested in hearing from me. And I'm sorry I didn't call for that, but she lived with her boyfriend. That's not something small... that's big. And it was enough to dash any hope I might have held.

Last night, I had a dream with her in it. I don't really remember the dream now, but I remember seeing her in the dream. It's the only thing I do remember. I decided to look her up on facebook to see if maybe she was there. And I found her. And she's married. And she has two kids. Most important though is that in the pictures she posted, she looks really happy.

So I am happy for her. And I know that getting in touch with her now would be bad. The reason I'm writing this blog entry is because I still feel like I lost something... or missed an opportunity somewhere that I'm really unhappy I missed. Sure, none of the circumstances were particularly good. She knew me because I spent money. She was living with her boyfriend. And now she's seemingly happily married. But there was opportunity somewhere in there to at least ask, and I did nothing.

I'm trying to think of any situations like the one years ago that are in my life right now... wondering if maybe there's a chance I should be taking... that I'll look back on and regret if I don't.

Not sure how to wrap this post up. I think it was mostly a means of getting my thoughts in order. I hope it was interesting at least. And I hope this means I learned a lesson, though I somehow doubt it.

Tuesday, January 6, 2009

Where I want to be in five years (professionally)

My boss (a long time friend) made it a job related task for me to figure out what I expect or hope for myself to be doing in five years professionally speaking. This blog post is going to be my effort at figuring out what my answer to the question is. So if you plan on reading the whole post... I'm sorry for the jumps in thought I'm likely to make.

I don't really know where to start. I mean, people have asked it of me in a general sense, where do I want to be with my life in some period of time. But I don't really have a good answer for those questions either. I usually think about things like being retired early, having a small beach house and a dog to play with, and of course, having enough money to not have to worry about it anymore. I don't want an extravagant life, but I don't want money to be a source of concern or stress either. I just want to live.

With that said, I guess the first and most honest response to where I want to be professionally is that I want to be retired with enough money to live on for the rest of my life. Then I start thinking about how unlikely that is, and really, what employer wants to hear that the employee isn't interested in working at all in five years?

I have to admit that of my software engineering jobs (and really the others as well), this current job is my favorite. I love the people I work with. The work itself is interesting, and I even crack open my laptop at home in my free time now and then to do some work. And I didn't even admit to myself that the pay was important to me before, but now I actually feel like I'm being paid fairly. So this company is one I can see myself still working for in five years, if the general feel of the company stays roughly the same for that long.

I just thought of two more things that might be important to keep in mind. First, I keep calling it a "job" instead of a "career". The difference in meaning is something I should keep in mind. Second, I've never worked for a single company for five years. Companies have gone out of business due to the dot com crash, some just laid off 40 to 60 percent of their employees, and one company fired me because they thought they could get more and better work from someone who didn't have half the experience I had and for less money. Oh well. No worries there. That company was awful. Anyway, I haven't worked at one place for 5 years before. So maybe I just don't have any basis for figuring out what I might expect or hope for in five years at this company.

My boss mentioned a few ideas to try to help me, like becoming the expert in a finer field of software developement, or maybe I want to be a tech lead, or something and have people reporting to me. And I keep coming back to "I don't know".

What about the idea of just seeing where the path leads on its own? Is that a valid option? I'm happy doing what I'm doing now. How can I possibly know what I will be happy doing in five years? "Goals" you say? I already mentioned my goals... to be retired, have a little beach house, and a dog I can befriend. "Professional goals" you say? I still don't know. There's some kind of disconnect. Maybe I'm just not an ambitious person. Maybe that's a good thing... maybe the way I am lends itself well to living in the moment instead of being trapped in the past or lost in the possibilities of the future. Maybe it's a bad thing because it means without an ambition for the future, I don't have enough motivation to accomplish much.

I was hoping that by writing all this stuff down I might find some answers. But I haven't come up with anything so far. I guess I still have lots to think about.