One from the archives

October 1, 2008

Ever notice this phenomenon:
Friday mornings usually, there will be a clear passing lane on the left side, and yet there will be a line of around 10 cars driving 50 mph in the right lane??

I call this phenomenon : Hung Over

Originally Added 7/11/2003 9:22:54 AM (I still have that database and website code... I can import the database soon for browsing)

Another gem, posted July 7th, 2004. It was about the dude at the bank being way too friendly and always wanting to talk to me. This was Bank of America (or Fleet, at the time) in Wayne, PA.

"He then has to shake your hand on the way out, saying "Thanks for stopping in!" Like, I'm gonna keep the check in my pocket and never deposit it."

God this is brilliant:
Recursion
I recurse like a sailor
Added 12/29/2004 5:18:32 PM

Comments

Age verification is dumb

June 16, 2008

How many times do you go to watch a video on a site that's not porn and it asks you for your date of birth? There's plenty of videos out there that do that... video games are the ones that annoy me the most. Especially since the sites that I watch videos on, I am registered for and my date of birth is stored with my profile. Sometimes it's just a 3 box combo of month, day and year where you have to type, other times it's 3 drop down boxes where what is automatically selected is January 1, 2004. Other times it's 3 drop downs for month day and year but no default date is selected. On GameTrailers.com, these are the least annoying. They don't have verification code built in so you can just press "OK" and it'll let you watch the video without selecting anything. On the ones with the 3 drop downs where January 1 2004 is automatically selected, I just drop the year down to 1980 or earlier, even though 1990 will suffice now (jeez, people born in 1980 are already 28). The only ones that get my real date of birth are the text box variations where it's easy to type. Seriously, the drop downs gotta go.

These are so dumb and annoying. But I guess you gotta be responsible. Annoyingly responsible to those who could watch R rated movies for 12 years now. To those who can buy anything where an age restriction is in place. To those of us who could almost run for president of the USA (35 is the minimum if I recall correctly). The only thing I can't buy, age-wise, is a house in my parents' community because you have to be 55 or older.

But I guess you gotta be responsible. You definitely want to make it a good warning that you should be of X years (13 for PG-13, 17 for R, etc) before you watch the movie, play the game, drink the beer, etc. But of those, I think it's only actually illegal to drink if you're not old enough. Still, those sites should save your birthday as a cookie or something so you don't have to enter it 120 times. That can't be used to track anything that they wouldn't already know or could even get any information from... how many people were born on March 23, 1979? Well, I guess, how many people were born on March 23, 1979 in the IP range that I use? Probably far less. But still. Hold onto my date of birth or make it so if I just press "OK" I get to watch it anyway :) I like that bug.

Tags internet
Comments

New Server!

June 12, 2008

This new server is about 4 times more powerful than my previous server, but for the same price. I will now definitely be putting lots of new stuff up on here to get the full use out of it. I have my subversion server running off of it, and again, an open invitation to anyone who wants all the free awesome code they can handle :P

Be wary of hosting companies installing MySQL for you. They might install the latest version of it (5.x), but in my.cnf specify that it should use the old password hashing method, the insecure one used before MySQL 4.1. This old method only generates a hash 16 bytes long, whereas the new one is 41 bytes (with a leading *). I did notice it but didn't think anything of it until I tried to login to my website here to post a new item. I had just finished getting all of my passwords for my websites input too. This required looking in the config file that I read to connect to the database to get the current password out, then running "grant all privileges on database.* to 'user'@'localhost' identified by 'password'" for each one. Ridiculous. I think I got them all right on the second go, I didn't feel like reading in the config files again. This site works, and so does Jim and Kate's site (which is awful and is long overdue for an upgrade). Vacre Tei works too. Stringed.org might work but not all of the name servers are pointed correctly yet, so I can't see it. It might work for you, it worked at the office.

Also, if you get "Can't connect to MySQL" and it's running, chances are it isn't allowing networking. I just commented out those two lines (old-passwords and skip-networking) and if I got all the passwords right, everything should work fine. Overall, the transition from the old server went without a hitch, but was a pain in the ass. Here's the breakdown:

  1. Zip up the websites on May 24 and promise not to upload any new files because then they'd also have to be pushed over.

  2. Zip up the databases and promise not to make any new posts or anything.

  3. Zip up tomcat since I don't want to have to reconfigure it

  4. Download them (the size of jasontconnell.com gzipped up is currently over 600 MB)

  5. Upload everything to the new server.

  6. Extract everything where it belongs.

  7. Update the MySQL passwords

  8. Set JAVA_HOME

  9. Hope it works


There were some other steps in there and perhaps at a later date I will be willing to tell them, but that's the gist of it. Enjoy!

Comments

Subversion server up

May 25, 2008

If you want access, let me know, I'll create you an account and let you access all the code on all of my websites! There's lots of neat stuff up there.

Subversion is a code versioning system that is heavily used by developers on teams who want to keep their source code in a single place, let people edit or view it, and keep versions of it. Branches are often made when projects are going to be upgraded from, for example, 1.0 to 2.0. The 1.0 branch is kept so that any bugs that come up for 1.0 users can be fixed without them having to upgrade to 2.0. Patching is also very easy with a good versioning system. There are many reasons to use them, and hardly any not to.

But why am I using one? Frankly because I had to set up a Subversion server at work (svn for short), so I knew somewhat how to do it. Also, because it's a good backup system. Like, hmm, this code used to work, I wonder what I did. Then I can just look back at the history of a file and see what changed, and revert back to what worked. Also, for backup, if I ever want to work on it anywhere, I can, because it's on my server that's on the internet 24/7 with the same IP address. Also if something were to happen to my computer and I haven't backed up recently, I'm screwed.

I've set up SVN about 5 times now, so I'm pretty much an expert. One thing that I am not an expert at is the authz file. The other stuff is simple though. Here's a rundown:

yum install subversion (or apt-get install subversion or emerge subversion) (or download it and run the exe or dmg on Windows or Mac)

svnadmin create /var/data/svndata

edit the configuration
vi /var/data/svndata/conf/svnserve.conf

edit the passwd file (add your user)
echo "jason = jason123" > /var/data/svndata/conf/passwd

(I actually haven't tested that exact syntax... it may put it on the same line as a commented line, which wouldn't work)

svnserve -d -r /var/data/svndata

This will create the repository and start the server daemon.

Then you can test it out.

svn mkdir svn://localhost/dev

It might ask you for a username and password then hopefully spit out the message

Committed Revision 1.

Then you can use your favorite code editor plugin for svn and start sharing! Simple as that.

Comments

What kind of world do we live in when...

April 16, 2008

You can get Short Circuit for $4.99?!? That's AWESOME! Of course, knowing my luck in movies, it'll be on all next month on HBO or something.

Also, Amazon might finally not lose lots of money on my Amazon Prime account. I just ordered tons of stuff... glasses for the kitchen since they all seemed to have disappeared recently... movies... silverware since most of them have also disappeared... napkin holder. It said it's all shipping in one package. ?? Yeah, we'll see. One shipment from one warehouse, definitely, but one package would be hard to believe.

I watched the debate in Philadelphia tonight between Barack Obama and Hillary Clinton. I thought I liked Obama better even though almost everyone who they interviewed after the debate said Clinton did better. They had a focus group of college students, and talked to them after the debate, and they said Hillary did better. I would have to disagree that she did better. But I can't say any of them did bad. I just felt like Barack was more comfortable up there, actually making eye contact with the person he was talking with. Debates are funny though. The first person who talks loses. If it's a debate between two people of the same party, you'll hear "Well, I agree with most of the points blah makes, but here's where we can approve on that." Basically, whoever gets in the last word. They'll never 100% agree. You'll never hear Obama say "Wow, I think Hillary has a great way to fix the blah problem in this country and I have nothing to add." You'll never hear short answers. You'll never hear an answer directly related to the question asked. I just laugh. I'm voting for Nader anyway...

Comments

New Patio and Kodie

April 6, 2008

My brothers and I have been working on the new patio for my house. Yesterday we laid the brick. I have video of the process. Contrary to the video, I wasn't standing around the whole time :P I actually moved about 350 bricks from the sidewalk to the patio, at about 25 bricks per barrel load, probably 50 pounds a pop. Here's the Kodie head tilt video:



My living room's a mess, and I'm not cleaning it until later today since we're not done for the weekend yet.

And here's the patio video so far. Next we'll be working on the lawn, putting in trees and a rock garden, and getting rid of all the grass and replacing it with mulch or rock or something.




I have to say, thank you to my brothers, Pat, Bean, and Scott, for their help / doing it all :)

I also have to say, I am glad that Google is around to upload my videos to for free and embed them in my website. And to Apple for iMovie '08, and Sony for the 30 GB HDD on my camera, and USB hookup, so I can record crap without worrying about tape and digitizing. Thanks.

Comments

The Internet: So good, yet so so bad

April 2, 2008

Oh internets, how I hate thee.

Some days I would just be better off without it. With all the blatant lies and corruption going on, I would love to just stay away. I should. Case in point, OOXML standardization in ISO. Just google "OOXML ISO". Also, I can't stand whiny HD-DVD fans complaining about Blu-ray winning the HD format war. More on that later. Some sites I hate include ZDNet... that's about it.

However, there's some oh so goodness to it. Like xkcd. I'm not gonna link or mention my favorite sites, but some are Amazon, Slashdot, Wikipedia, and iTunes science podcast directory.

Ok, onto my ZDNet-hate-HD-DVD-Blu-ray-hate rant. So, this dude on ZDNet works at Microsoft and posts to that site. Is complaining about Blu-ray today, or whenever, that "the more expensive format won". But then he goes on to call blu-ray "more future proof". I've caught this dude on so many contradictions like this, it just makes me angry. Of course, he never responds to my posts, and he keeps making asinine statements and I keep responding and he keeps ignoring, it's just a frustrating mess. Of course, "more future proof" means less expensive in the long run. It just points to the quality of worker they have there working at Microsoft.

Of course, the non-Microsoft world has its shining stars too. Like the writers of PHP. It's ridiculous. For instance, today I wanted to find the first paragraph in an HTML string, and I'm fairly familiar with regular expressions, so I checked the syntax on how to match a string to a regex and get the matches (groups in any other regular expression library terminology) out of it. This is easy: /<p>(.*?)</p>/g. But not in PHP.


$matches = array();
preg_match_all("/<p>(.*?)</p>/", $htmlString, $matches);


OK, looks easy. $matches will then have an array of matches. But that's where it gets tricky. The fourth parameter is optional, and it's called "flags". Read the "flags" part here.

PREG_PATTERN_ORDER - Orders results so that $matches[0] is an array of full pattern matches, $matches[1] is an array of strings matched by the first parenthesized subpattern, and so on.

PREG_SET_ORDER - Orders results so that $matches[0] is an array of first set of matches, $matches[1] is an array of second set of matches, and so on.

PREG_OFFSET_CAPTURE - If this flag is passed, for every occurring match the appendant string offset will also be returned. Note that this changes the value of matches in an array where every element is an array consisting of the matched string at offset 0 and its string offset into subject at offset 1.

Yes, the "matches" array will be different for every flag. In Java, this looks (half-hearted with no syntax check) like this:


Pattern p = Pattern.compile("/<p>(.*?)</p>/");
Matches matches = p.match(htmlString);
for (Match m : matches){
m.group(1); // always contains the first set of parentheses in the regular expression.
}


I'm tired so I have to finish writing another time. Tune in for part two soon!

Tags internet
Comments

Amazon.com Market

March 20, 2008

Sometimes I'll add an item to my amazon.com cart, only to end up leaving it there for months.




When I added that MicroSD card for my phone, it was like $30. Buy!

Now, Jaws on the other hand... Damnit, I missed the $9.99 price.

Another item, I think it was Bill & Ted's Excellent Adventure, just reached below $6 earlier this morning. Might have to hop on that one.

Tags internet
Comments

Acid3: Embarassing Browser Makers Everywhere

March 5, 2008

Did you take Acid3 with your browser?

My FireFox 3 beta 3 scores 61 out of 100. The best reported was Opera 9.5 at 65. The cofounder of Opera was a designer of CSS or something. Acid3 was more of a Javascript + CSS test, whereas Acid2 was strictly CSS. FireFox 3 beta 3 passes that easily.

Microsoft's IE6 doesn't fare well. I think it got 7 out of 100. IE7 is probably way better? Nope. 12. Linux based browsers like Konquerer scored in the mid 50s.

I read a comment somewhere, probably Slashdot, that said these tests aren't to see if it's a good browser, but more to push the browser makers so that developers can use the things that they test for and take for granted that a wide variety of users will be able to support them. That should make a lot of developers happy. Except for Microsoft! They just got done making sure their latest version of IE, 8, which is in beta, passes the Acid2 test. That's where free software owns. Release cycles based on business fiscal schedules are no good for anyone.

Tags internet
Comments

More upbeat stuff coming soon

February 14, 2008

I like rap and stuff with good beats that can make you dance. My next few songs will be like that. My favorite thing about guitar is its percussion. Particularly about my Gretsch going through the Blues Deluxe and my microphone to my computer etc. I love the sound of it. Before I start recording, I usually sit there for a good hour with my eyes closed just listening to the output of the microphone through my headphones. It just sounds so f#%@#$ing good. Compared to my old way of recording, you hardly got any percussive variations no matter how much you tried. Now, just hammer on that B and roll a bass line in E, and it just sounds incredible. No more old way for me!

Also a word on guitar. Again. I noticed that when someone who doesn't play guitar listens to my song from last week (here), they usually judge it based on my soloing ability. Whereas when I listen to it (over and over for hours), I listen to it for the rhythm guitar. Just a thing I noticed when my coworker, the smercenary, and I were on our way back to the office after a client meeting in Exton, and we had to take a back way because it was around 5pm and the Schuylkill Express was jam packed. I decided to put on Jimi Hendrix' "BBC Sessions", a two disk album, which got us through, and "Driving South" made me easily do 90. I didn't know the area that he was taking me, and we were coming up on a turn and he almost missed telling me to take it, and he said "I almost missed the turn there because Jimi's guitar playing is so f%@$ing good." It was just rhythm playing :P Scott's a musician too. But I typically love Jimi's rhythm playing too.

When I practice, lately, I'm practicing my rhythm, so my soloing skill has been declining. I don't wonder if it's because I'm getting better at rhythm that I tend to favorite it and practice it more, getting even better in the process. It's my favorite whether I suck at it or not.

In totally unrelated, totally geeky news, I saw an article about a moon on slashdot that was tagged with the most hilarious tag ever: thatsnomoonitsagasstation. Be sure to read the article.

Comments