Shaken in Blacksburg

Normally on a Monday, I enjoy getting back into the swing of things at work. After a weekend away, I usually have a ton of work to catch up on, but today was not a day for that … After driving by West AJ and seeing 4 cop cars in front of the building, then hearing all the reports of shootings, all I could think about was my friends on campus and their safety. »

Brian Hartsock

PHP Security class

So, you’re designing a new feature in PHP for an application. Like most good programmers, you have a data layer and a business logic layer. But where is your security layer? For the most part, whenever I design a new feature, all the security goes into the business logic, because the data layer should be “dumb”. Well, this is annoying because 1) I have a lot of repeat code and 2) it’s very easy to forget something. »

Brian Hartsock on #PHP,

Prototype and speed

Since Mike doesn’t really blog anymore, I figured I would steal his thunder and discuss some of his findings the past week. For those of you that haven’t used Prototype before, it is a Javascript library which we use fairly heavily at webmail. It has served us well for a while now ….. But version 1.5 is becoming too slow to be used in webmail. Being a very large web application, we don’t always have the luxury of elegant code, especially in javascript. »

A better web framework - Part 1

As I have mentioned before, design patterns are one of my favorite areas of computer science. Well, design patterns have a close association with web frameworks, so web frameworks are definitely another favorite area of mine. They both help speed up the development process by providing a structure for applications. Since Ruby on Rails took off a couple years ago, other web frameworks have sprung up in many other languages. None of these have met my needs at Webmail.us. »

Gnome vs. KDE and Joel on Software

Since I converted to Ubuntu a few months ago, I have wrestled with the decision of KDE vs. Gnome. KDE has infinite configurability, while Gnome tries to be much more simplistic. I like many of the KDE applications, like Amarok, Krdc, and Kaffiene, so I thought I would try to switch from Gnome to KDE. This lasted about 3 hours. I spent all 3 hours trying to configure KDE to my liking, to basically mimic Gnome. »

Brian Hartsock on #Linux,

The best web framework yet

Ever since Ruby on Rails, every other web development language has attempted to develop a similar framework. Normally I don’t like them because they try and copy RoR, which can be hard because of Ruby’s differences with most other programming languages. But, I finally found one I will back. PythonOnPlanes is awesome. Not because of what it can do, but because its name is amazing. I have never really coded in Python, but I think I am going to start very soon. »

PHP References revisited

After writing this post a few weeks ago about PHP references, I realized I missed one great use for references. The example scenario is this, you have an array of array’s representing rows returned from a database. You want to convert these arrays to specialized objects quickly and easily. $rows = $this->findRows(); foreach($rows as &$row){ $row = new RowObject($row); } Basically, what is happening is we are referencing the $row reference in the foreach loop. »

Brian Hartsock on #PHP,

Using overflow:hidden in tables

Until today, I never used the CSS properties overflow: hidden and white-space: nowrap on table cells. I always thought it was useless, since it never seemed to work for me. As a disclaimer, I am not a CSS guru. In fact, CSS is probably where I am least knowledgable in web development. Fortunately, I ran across the table-layout: fixed property on the W3 website. This changes the table algorithm to just take into account the table cell width. »

Brian Hartsock on #CSS,

Boston

A while ago I said I would try to keep this blog fairly technical, but sometimes you have to let loose and relax. I just got back from a long weekend in Boston and figured I would write a little about it. Boston seems like a great city to live and to visit. Surprisingly, it was very similar to what I thought it would be. It’s a city that has a very homey feel and because of all the colleges, a great crowd. »

Brian Hartsock

Sound Juicer hassle

After a Googling for a few hours, I finally got Sound Juicer, an audio extraction application for linux, setup correctly. Although I am very happy with Ubuntu, problems like this are why I think the rest of the world still isn’t ready for linux. There are still just too many simple problems that require experts knowledge (I am not an expert, Google is my expert). Problem #1: Lame Ubuntu doesn’t include any Lame or MP3 plugins. »