Monthly Archives: December 2012

znurt.org cleanup

So, I finally managed to getting around to fixing the backend of znurt.org so that the keywords would import again.  It was a combination of the portage metadata location moving, and a small set of sloppy code in part of the import script that made me roll my eyes.  It’s fixed now, but the site still isn’t importing everything correctly.

I’ve been putting off working on it for so long, just because it’s a hard project to get to.  Since I started working full-time as a sysadmin about two years ago, it killed off my hobby of tinkering with computers.  My attitude shifted from “this is fun” to “I want this to work and not have me worry about it.”  Comes with the territory, I guess.  Not to say I don’t have fun — I do a lot of research at work, either related to existing projects or new stuff.  There’s always something cool to look into.  But then I come home and I’d rather just focus on other things.

I got rid of my desktops, too, because soon afterwards I didn’t really have anything to hack on.  Znurt went down, but I didn’t really have a good development environment anymore.  On top of that, my interest in the site had waned, and the whole thing just adds up to a pile of indifference.

I contemplated giving the site away to someone else so that they could maintain it, as I’ve done in the past with some of my projects, but this one, I just wanted to hang onto it for some reason.  Admittedly, not enough to maintain it, but enough to want to retain ownership.

With this last semester behind me, which was brutal, I’ve got more time to do other stuff.  Fixing Znurt had *long* been on my todo list, and I finally got around to poking it with a stick to see if I could at least get the broken imports working.

I was anticipating it would be a lot of work, and hard to find the issue, but the whole thing took under two hours to fix.  Derp.  That’s what I get for putting stuff off.

One thing I’ve found interesting in all of this is how quickly my memory of working with code (PHP) and databases (PostgreSQL) has come back to me.  At work, I only write shell scripts now (bash) and we use MySQL across the board.  Postgres is an amazing database replacement, and it’s amazing how, even not using it regularly in awhile, it all comes back to me.  I love that database.  Everything about it is intuitive.

Anyway, I was looking through the import code, and doing some testing.  I flushed the entire database contents and started a fresh import, and noticed it was breaking in some parts.  Looking into it, I found that the MDB2 PEAR package has a memory leak in it, which kills the scripts because it just runs so many queries.  So, I’m in the process of moving it to use PDO instead.  I’ve wanted to look into using it for a while, and so far I like it, for the most part.  Their fetch helper functions are pretty lame, and could use some obvious features like fetching one value and returning result sets in associative arrays, but it’s good.  I’m going through the backend and doing a lot of cleanup at the same time.

Feature-wise, the site isn’t gonna change at all.  It’ll be faster, and importing the data from portage will be more accurate.  I’ve got bugs on the frontend I need to fix still, but they are all minor and I probably won’t look at them for now, to be honest.  Well, maybe I will, I dunno.

Either way, it’s kinda cool to get into the code again, and see what’s going on.  I know I say this a lot with my projects, but it always amazes me when I go back and I realize how complex the process is — not because of my code, but because there are so many factors to take into consideration when building this database.  I thought it’d be a simple case of reading metadata and throwing it in there, but there’s all kinds of things that I originally wrote, like using regular expressions to get the package components from an ebuild version string.  Fortunately, there’s easier ways to query that stuff now, so the goal is to get it more up to date.

It’s kinda cool working on a big code project again.  I’d forgotten what it was like.

2 Comments

Filed under Gentoo

another semester done

I just finished my Fall semester for 2012 today at UVU.  This was, by far, the hardest semester I’ve ever had since I’ve been in school.  It was brutal.  I had three classes which carried with it more work than I was expecting, and I spent a lot of time in the past four months doing nothing but homework.  I was talking to my cousin tonight about it (while we were doing some late-night skateboarding in the winter, which, it’s actually really nice out here right now), and I mentioned that the stress was a huge burden on me.  Stress is normal, but I’ve learned that if something heavy is really going on, I notice I will stop being cheery.  I don’t really get somber, but it’s more like, just focused and serious all the time.  Which can be a real bummer.

But, the semester is finished, and it’s freed up a lot of time and has taken that huge burden off of me.  I got good grades, and along with that, and some great friends that really stepped up at the last minute and helped me out, it’s really gotten me humbled and grateful to God and everyone that stood by me.  I’m really glad this semester is done.

One thing I learned from this last jaunt around is that I’ve decided I’m never taking online classes again.  I had two this semester, and one on campus.  Looking back, I’ve always had a range of issues with online courses.  Either I don’t understand the material very well because I can’t chat with the professor one on one, or I slack the whole time (I did 50% of the coursework in one day.  I’m not kidding).  The worst one though is I never really feel like I “get” the material.  I jump through hoops, get a grade, and move on, but it doesn’t seem like I learned anything.

So, I’m sticking to just two classes from here on out, and doing them all on-campus.  That’ll be manageable.

For now I’m really looking forward to not so much having more time, but having less stress.  I’ve been wanting to work on some cool side projects, and I also have been itching to go skating … a lot.  So tonight I went on a two-hour run with my cousin down Main Street in Bountiful, and it was really cool.  We call it a “mort run” since we start at the top of a hill and go all the way down to the mortuary.  It’s smooth all the way down and  you can just push around and then either skate back up hill or walk.  It’s a good workout.

The best part tonight though was debating whether or not we should go to the drive-through at Del Taco, knock on the window and ask for something.  We didn’t, but we circled the place like eight times and probably freaked out the employees while we debated it.  Eventually, we realized he didn’t have enough cash to buy something on the dollar menu (he was a penny short), so we spent half an hour wandering around downtown looking for lost change.  It was pretty fun. :)

Soooooooooooo ….. projects.  One thing I have time to look into now is znurt.org.  It’s broken.  I’ve known it’s been broken.  It would take me probably less than an hour to fix it.  I haven’t made the time, for a lot of reasons.  It’s actually been on my calendar reminding me over and over that I need to get it done.  I’m debating what to do about the site.  I could just fix the one error and move on, but it’s still kind of living in a state of neglect.  Ideally, I should hand the project over to someone else and let them maintain it.  I dunno yet.  Part of me doesn’t wanna let it go, but I guess a bigger part doesn’t care enough to actually fix it so … yah.  Gotta make a decision there.

Other than that, not much going on.  I moved to a new apartment, back into a complex.  I like it here.  I have a dishwasher now, which I’m really grateful for (I haven’t had one in the last three apartments).  The funny thing about that is I seriously have so few dishes, that filling up the entire thing with all of mine it’s half full.

Anyhoo, I am really looking forward to moving on.  My big thing is I wanna get some serious skating time in while I’ve got the time.  That and enjoy the holidays with friends and family.  I’m looking forward to next semester too.  I’ve got a class on meteorology and another on U.S. history.  I’m almost done with generals.  The crazy part about all of this?  Since I went back to school two years ago, I’ve put in 30 credit hours.  Insane, for someone working full time.  I tell you what.

Leave a comment

Filed under General