Logan Buesching http://agoln.net Development and personal site Wed, 23 Jul 2008 05:29:07 +0000 http://wordpress.org/?v=2.6 en The Fashion Police Have Arrived http://agoln.net/archives/119 http://agoln.net/archives/119#comments Wed, 23 Jul 2008 05:13:36 +0000 Logan http://agoln.net/archives/119 In an off the wall post for my blog - it appears that a small suburb of Chicago has banned baggy pants.  In short, you cannot show more than 3” of underwear otherwise you get a $25 ticket.

Needs a ticketI personally don’t wear my pants that baggy, but it does raise quite a few questions.  What is considered underwear?  Some people may wear gym shorts instead of underwear – are they allowed to show 3” of gym shorts?  What about those that choose to go commando – can they show 3” of crack?

What about other fashions that “keep major retailers and economic development away”?  I for sure wouldn’t want to open a business if people dressed like furries… or even Paris Hilton.

What about times of the year where it may even be encouraged to wear baggy pants, such as breakfast club or Halloween?

I think they have gone down a slippery slope which may get them into hot water.

]]>
http://agoln.net/archives/119/feed
Riding The Connector http://agoln.net/archives/114 http://agoln.net/archives/114#comments Wed, 16 Jul 2008 17:45:34 +0000 Logan http://agoln.net/?p=114 bus1 Just after my move to Seattle, my Indiana license plates expired which has left me without a car.  Although an awesome benefit from Microsoft is a free bus pass, they also have this amazing bus that picks you up and takes you to work every day called The Connector.  It has been over two weeks now since I have been riding it every day, and while it’s not as convenient as driving my car, it’s good enough for me not to make getting my plates a priority.

For perspective, I ride the Queen Anne / Belltown bus, getting on at 1st and Wall.

Scheduling a Ride

In order to ride the connector, you must schedule the time for it to pick you up and drop you off.  This can be a bummer at times for two reasons.  The first is that you must remember to schedule your bus ride, and most of the “best times” (i.e. not departing at 6:45am or leaving at 7:00pm) are going to be taken by the time you actually remember to schedule it.  The second reason is that although you don’t need a reservation, you will most likely be able to ride the bus if you don’t sign up.  There have only been two times that I have seen people denied access due to not having a reservation.

The Ride

The ride is fairly nice.  This isn’t any luxury vehicle you are riding, but it’s not a school bus either.  The seats are comfortable but the ride can get a little bumpy at times. There is free Wi-Fi on the bus, so you can actually do some of your work while you ride the bus.  Another option that I tend is to read that book that I never have time for.

The traffic in Seattle isn’t as bad as Chicago, but crossing 520 isn’t a breeze without being in the car pool lane.  So any time that I save by driving my car is quickly negated by having to wait in the stop and go traffic.  From the time I walk out of my office to the time I walk into my building is about the same weather I drive to work or take the bus.

Routes

Grechen over at Microsoft’s JobsBlog just posted the stops that The Connector takes, so feel free to take a look at those.  I know that this information would have been helpful as nobody seemed to know the exact routes that it took.

]]>
http://agoln.net/archives/114/feed
Working at Microsoft http://agoln.net/archives/111 http://agoln.net/archives/111#comments Wed, 16 Jul 2008 15:19:27 +0000 Logan http://agoln.net/archives/111 It is currently a little over a month into my full time employment at Microsoft, and I am extremely pleased with everything that I am working on.  For those that don’t know yet, I work on the installer for the Windows Live team.

Fringe Benefits

I am going to go out on a limb and say that what I enjoy the most at Microsoft are the fringe benefits.  This includes things such as a laid back atmosphere (I wear a t-shirt and jeans every day), free soft drinks (Coke AND Pepsi products, though I usually drink milk or juice), riding the connector, awesome club membership, and people who are much, much brighter than I am.

Another “benefit” is that I now get to be on the “inside” of everything that’s going on at Microsoft.  I have already been given a demo of Windows 7 (WAY more than just a new touch screen) and I have daily builds of every Windows Live application available (Live Writer is sweet).

The Work

Although I can’t discuss details of everything that I work on, I can say that I learn so many new things every day.  My first day at work, my mentor and boss gave me a set of books to get me familiar with what types of things I will work on.

Books given on first day

Those are just the books that I got on my first day – more have arrived and more are on order.  Needless to say, I probably don’t have an excuse for not being busy :P.

My day-to-day work consists of Win32 (obviously)/C++/COM work, which before I started I had no experience.  After digging my heels in for a month and wondering around a forest of code, I have made some clearings and know a few different pieces of a lot of code.

One aspect of working at Microsoft that I have enjoyed so far is that I have gotten to be in control of what I am doing, and people trust me to complete my assignments.  This is obviously a scary feeling when I dig into a bug, or adding new functionality in an area of code I haven’t even looked at, but up to this point I have managed to not hose the build system too terribly.

About the only thing I am not enjoying are some of the tools we have to use.  I have always been a Subversion or Mercurial guy, and the version control we use just doesn’t cut it.  From looking at the commands, there are sometimes three commands that do the same thing, just slightly differently.  Why create a whole new command when a flag would do?  I am already thinking about making Mercurial manage Source Depot.

The Future

Each team around here is scrambling to finish the current milestone (most teams it’s this week with others next week), which has given me an opportunity to see a coding milestone from start to finish.  The race has been interesting and has kept me on my toes.  I look forward to my continuing adventures at Microsoft.

]]>
http://agoln.net/archives/111/feed
Life Changes Part 1 – Moving to Seattle http://agoln.net/archives/108 http://agoln.net/archives/108#comments Fri, 06 Jun 2008 18:31:12 +0000 Logan http://agoln.net/archives/108

It has been more than a month since I last typed up a post, and I have decided to write about my more recent experiences in a multi-part blog series.

Graduation

As many may know, I was offered a position at Microsoft within the Windows Live team which I accepted.  Just after graduation I went home, and enjoyed my couple of weeks off to prepare for the long road trip ahead of me.  The plan was to leave Thursday, May 15th and arrive in Seattle on Saturday, May 17th.  On the agenda was visiting two friends and Mount Rushmore before arriving in Seattle.  The trip totaled around 2500 miles, and over 30 hours of driving.

Day 1

The first day I met up with two friends, Sarah and Dave before finally resting for the day in Sioux Falls, South Dakota.  Day 1 was probably the exciting due to it involved driving through Chicago and Minneapolis, but frustrating because I got a speeding ticket for going less than 10 over :-/

Day 2

Day two was long, and boring.  If you have never been to South Dakota, consider yourself blessed.  The land in South Dakota is completely flat with no tree’s.  During one point in my trip I found a structure and wondered how far it would take me to drive to it.  It ended up being a little over 15 miles away!  Near the end of the day it started to get interesting as my brother and I were starting to enter the Rocky Mountains.  At the end of the day we stayed in Butte, Montana.

Day 3

The third day seemed to by incredibly fast.  We were going through the beautiful Rocky Mountains, passed by Idaho, and flew through Washington on our way to Seattle.  In total, this was probably the most breathtaking day of the whole trip.

In my next blog post, I will talk about searching for my new apartment, (boring topic, won’t post) then I will finish with my experiences working at Microsoft.

]]>
http://agoln.net/archives/108/feed
Running AIR applications w/o installing AIR on Linux http://agoln.net/archives/106 http://agoln.net/archives/106#comments Fri, 02 May 2008 08:13:29 +0000 Logan http://agoln.net/?p=106 Recently, Adobe released an AIR client for Linux. Some people complained about the need for root privileges for not only installing AIR itself, but also for installing AIR applications. If you are worried about providing your root password to a binary, here is a work around.

  1. Download the AIR SDK
  2. Unzip the AIR SDK
  3. Download your favorite AIR application
  4. Unzip the .AIR file (yes, unzip it)
  5. /path/to/air_sdk/bin/adl -nodebug /path/to/air_application/META-INF/AIR/application.xml /path/to/air_application

For example, if you were to unzip the AIR sdk to ~/AIR-SDK and unzip Spaz to ~/spaz, the command for #5 would be

~/AIR-SDK/bin/adl -nodebug ~/spaz/META-INF/AIR/application.xml ~/spaz/

Good luck!

]]>
http://agoln.net/archives/106/feed
Section 230c For Developers http://agoln.net/archives/103 http://agoln.net/archives/103#comments Fri, 04 Apr 2008 09:31:58 +0000 Logan http://agoln.net/?p=103 Preface

I am not a lawyer. Do not take this as legal advice.

It was brought to my attention that Roommates.com was sued for violating the Fair Housing Act (FHA). This was of extreme interest to me because of my similar roommate finder application, and how it may effect the future of it. The ruling concluded that Roommates.com was not immune by section 230 of the Communications Decency Act. Although a ruling of weather or not they are guilty of violating the FHA has not been decided, it has been decided that they are not immune.

Section 230 of the Communications Decency Act

Section 230 is what allows a website operator to not be held liable for content that they did not make. Without such a law, the Web 2.0 revolution would not exist. Imagine Reddit.com being sued for a comment someone makes, or Flickr being sued for a picture someone didn’t like.

How It All Began

Before there was section 230, there existed this marvelous new thing called “The Internet”. In order to access this mysterious place, most people had to use a dial up account through a provider. One of those providers happened to be called Prodigy. Prodigy had a message board for various purposes, and from time to time, a moderator would remove offensive posts. Because they were actively monitoring their service, they were put in the same territory as a newspaper publisher and thus legally responsible for all the content that they did not delete. Another provider, CompuServe, did not delete any information, and therefore was not liable for the postings of its users.

After reviewing this case, Congress sought to allow computer services the ability to edit user-generated content without becoming liable for all the content.

Service Providers vs Content Providers

A service provider can be thought of as any interactive site that allows 3rd party user generated content, while a content provider is the actual person/company that generates the content.

Under 230c, a service provider is immune from content generated by a 3rd party provided that

  1. The 3rd party content was not created by the service provider itself
  2. It is not responsible in whole or in part as to what content is shown
  3. Maybe other things… (IANAL)

So Roommates.com can be liable for the content of fake accounts that they create or a drop down menu, but not freely generated responses such as in someone’s description.

The entire reasoning behind section 230 is such that a service provider is immune from removal of user generated content, but not immune from the creation of content.

Why Roommates.com Got The Short Stick

Roommates.com drew the short stick basically because it required users to disclose sensitive information to register and that there was no ability to hide the information. The Fair Housing Council claimed that, “[Roommates.com] created the questions and choice of answers, and designed its website registration process around them. Therefore, Roommate is undoubtedly the ‘information content provider’ for posting them on its website, or for forcing subscribers to answer them as a condition of using its services. as to the questions and can claim no immunity [under section 230].”

What About The Future?

Seeing headlines like this can make a web developer extremely uneasy, especially for someone who is unfamiliar with the law, or who cannot afford a lawyer. Thankfully, in the ruling, they make it pretty clear as to how to be sure that you will be granted immunity under section 230c: “We got it right in Carafano, that ‘[u]nder § 230(c) . . . so long as a third party willingly provides the essential published content, the interactive service provider receives full immunity regardless of the specific editing or selection process.’”

So what I’m going to do in the future is make sure that a user must specifically allow the viewing of such information, or provide a “not specified” option.

* IANAL, get a lawyers opinion as this is not legal advice! *

]]>
http://agoln.net/archives/103/feed
Zend Studio for Eclipse on Windows Debugger Issues http://agoln.net/archives/102 http://agoln.net/archives/102#comments Wed, 26 Mar 2008 10:08:44 +0000 Logan http://agoln.net/archives/102 When attempting to debug my program, zend studio for eclipse wasn’t recognizing that I had my mysql extension installed. I found a small work around.

Go to
[install_path]\plugins\org.zend.php.debug.debugger.win32.x86_5.2.12.v20071210\resources\php5

In there, you will see your php.exe’s and your php.ini that the debugger uses. I just copied my php.ini there for it to work.

]]>
http://agoln.net/archives/102/feed
Hackers http://agoln.net/archives/100 http://agoln.net/archives/100#comments Fri, 21 Mar 2008 05:22:57 +0000 Logan http://agoln.net/archives/100 Public methods should be deceptively named to foil would-be hackers.

]]>
http://agoln.net/archives/100/feed
Zend_Pdf_Cell Proposal http://agoln.net/archives/99 http://agoln.net/archives/99#comments Thu, 20 Mar 2008 03:00:15 +0000 Logan http://agoln.net/archives/99 After a few weeks of downtime, and helpful input and comments from my readers, I have finally submitted my Zend_Framework CLA and authored a Zend_Pdf_Cell proposal! Please feel free to read it and comment on any of the functionality! I really hope that this can get integrated within the Zend Framework, as I have put a lot of time into this and hope that the community can gain as much as possible from it.

I want to give everyone a great big thanks for the valuable feedback and excellent encouragement!

]]>
http://agoln.net/archives/99/feed
Writing An Active Record Class http://agoln.net/archives/98 http://agoln.net/archives/98#comments Wed, 19 Mar 2008 14:45:27 +0000 Logan http://agoln.net/archives/98 As the Active Record class has become increasingly popular due to it’s wild success in Ruby on Rails, it seems as though every framework has an implementation of it. It is no surprise that inside the covers of the MyEPICS framework lives an active record class that I had created. This class has evolved and changed over time, which I am going to share my experiences writing it. It is far from finished, but it has been quite a great learning experience along the way.

2.0 Implementation

The MyEPICS 2.0 implementation contained one master database class (ME_DB) which contained generic CRUD functions, and each table contained its own class which would implement the specific CRUD functions for each table (ME_DBO). A sample way to read users with the name ‘bob’ would be the following:

$user=new ME_DBO_User();
$user->read(array('name'=>'bob'));

And to update a person’s last name to “foobar”, you would do the following:

$user->lastname="foobar";
$user->update();

About 90% of each of the ME_DBO classes were the same code, and there was even a script to create a DBO class given a SQL create statement. A major problem with this approach is that for every new table created, you needed to make sure you created a new ME_DBO file, and that the file really only contained such things as which columns were in the table and their default values. We would have about 2k lines of code between 30 files, of which only about 50 lines were different… YUCK! Over Christmas break, I decided that this was a major, major issue that needed to be worked out before MyEPICS 2.1.

MyEPICS 2.1 Implementation

With the 2.1 implementation, I took a step back and attempted to create two classes which would fix the pitfalls of the 2.0 implementation. What I ended up doing was using MBD2’s reverse engineering module in order to find out which fields were available and what their default values were. This reduced the need for a separate file for each table and removed about 1500 lines of code from the Active Record implementation. Now, instead of

$user=new ME_DBO_User();

You would do this instead

$user=ME_Db::factory('User');

This has the main database create a Dbo object with just the right properties that you need.

The only major gripe I have with the current implementation is that I don’t implement anything for relationships. If you need information from a relationship, then you have three options.

  1. Cry
  2. Write Manual SQL
  3. Write many lines of code which does a lot of extra sql queries and is inefficient and crappy

I mainly want to create something so that the relationship table is transparent. A lot of the time, your relationship table doesn’t have anything of value in it, and it only exists for a many to many relationship.

SQL Command Functions

About

One such feature that I see in a lot of Active Record implementations is the ability to use functions named after SQL commands, such as:

$db=new Some_Active_Record_Class();
$db->select('firstname')->from('User')->where('id=5');

Mostly, I had disregarded this need in my Active Record implementation because it seemed like it was a lot of work for very little gain. Why would you need to allow such functionality when creating a simple sql statement would do?

Well, I think I had just stumbled upon the reason for its need.

The Problem

I have a class for a user and contains information pertaining to the user such as first name, last name, e-mail address etc… It has some very useful functions such as getUserWithRole($role) and getPriviliges($user). What I need to be able to do, is extend this information through one of the MyEPICS modules. Such an example is in my Roommate Finder application, which extends the user to give them traits. The user module does not know about the Roommate Finder application, nor should it have to. Now, here’s the problem. What I need to be able to do, is return a result set of all the users’ traits, where the user has a certain role. I already have the code to return all users with a certain role in the Users module, now I just need to attach the trait information to the output of it.

I have come up with a few different solutions that would plug this hole, but not fix the problem, with most of them being some variation of typing up a single sql statement to get me the information. What I don’t want to do, is getUsersWithRole(), then iterate through all of theses picking out the traits for each individual user. This would result in at least one sql statement per user, which is highly innefficient.

I want to be able to execute this functionality in one sql query, without having to tightly couple the User module with the Roommate Finder module, and without duplicating functionality already existing in the User module.

A Solution?

What I have been thinking about that would solve this problem would end up having me creating something like the database command functions. Then, what the getUserWithRoel() function would do, is instead of returning the results, it would return a Dbo object with the sql already added. So that if getUsersWithRole() would normally result in some query like “select role from roles where role=?”, then it would now return an object that represents this statement. What this would allow me to do is chain these functions together, then only execute the query at the end. For example:

//fetch results in an array
$dbo=$userModule->withRole('Tenant')->join('Traits')->fetchArray();

This has several features which I haven’t implemented. Easy relationships, chaining of functions, and the sql commands.

Is it bad that I am never satisfied with what I already have, and always want to refactor to make it better?

]]>
http://agoln.net/archives/98/feed