Very Frankly Speaking

better than your blog.

Archive for the ‘ work ’ Category

MySQL Workbench 5.2

Tuesday, January 19th, 2010

For those of you who like to see things visually, the newest release of MySQL workbench enables you to connect to your existing MySQL database and reverse engineer it so that you can see the full ERR (Entity Relationship R_____) Diagram in all its glory. For me this is helpful to see when I’m taking over a project I know nothing about. As long as the foreign keys are set up correctly, the tool should be able to do all the work for you. You can also make changes to the Diagram and then have it synchronize with your development/production database. This feature used to be some sort of premium feature that you had to upgrade and pay for, but I just discovered that it’s all included in the free download. I like free stuff.
http://dev.mysql.com/downloads/workbench

Screenshot:
MySQL Workbench Screeshot
After reverse-engineering the existing MySQL database, you can get an ERR diagram that looks like this. Now your job is to nicely organize the tables.

PHP Makes You a Lazy Programmer

Wednesday, May 13th, 2009

The fact that you don’t have to initialize your variables in PHP makes me a very lazy programmer.  With a large scale project that I’ve been working on for the past 6 months, I’ve really paid the penalty for dumb mistakes like not initializing and resetting my variables.  So just because PHP doesn’t make you do that stuff, it’s always best practice to do so.

PHP String Concatentation Performance

Friday, April 17th, 2009

I’m not sure if this is totally correct and I have no fixed way of measuring this (other than that I don’t get any timeout errors anymore) but I’ve noticed a significant difference when choosing between two different methods of string concatenation:

Slow way:

foreach($oranges as $orange){
$orange_str = $orange_str . $orange;
}

Better way:

foreach($oranges as $orange){
$orange_str .= $orange;
}

This is obviously simplified for example’s sake, but I had a situation where I was concatenating several hundred (maybe a thousand) elements to a string and I was receiving a “Fatal error: Maximum execution time of 30 seconds exceeded…”.  My best guess is that with the first method, an actual copy of that string is being made in memory so you’re probably taking up twice the amount of memory than you should be.  That’s just my guess.

Embarrassing, lol

Friday, February 13th, 2009

I’m handing over an application with zero documentation.

If I wanted to take the bus home from work…

Monday, June 2nd, 2008

Google Transit is saying that it will take me 53 minutes to get home if I ride the bus. It will cost me $1.50 to take the bus. It’s less than 10 miles between home and work. My car gets about 34 miles per gallon. Gas was like $3.79. I think it will be cheaper to drive.

Here’s the Google Transit route: http://twurl.nl/genltl