Facebook
Github
LinkedIn
TwitterFunny, even though I have two close friends who are epileptics.
Here’s my sense of humor: my friend Andrew had a seizure while running and slammed face-first into the ground, mangling his face pretty badly. The next day, he was in bed resting and we brought him dinner. I got him what he ordered, but also a side of Caesar Salad.
Get it? Seizure, Caesar?
Keep Reading » 1– This post is geared towards my non- or semi-programmer friends, based on a conversation I had with one of them the other day that I felt needed more clarification.
Before I begin, I will concede the point that “PHP Can Do Anything” before some friends threaten to hurt me. [php dynamic methods] I in fact have probably done more client work in PHP [mad props to code igniter] than any other programming language, but I’ve really enjoyed working with Rails since I made some small utilities about two years ago. I’ve had a lot of *very* boutique projects that were great in their time and place, but I decided to retire. Anywho, I have a very anti-fanboy stance on a lot of Objects that tend to inspire fanboy-ness (Apple, iPod, Rails, America) I think they are great, but don’t think everything else is shit and useless.
I think my brain works in such a way that I always liked to have access to what was going on – I wanted to see my options. When I first started writing C programs in 8th grade, I remember outputting the value of every variable at every point of the iteration, just to be able to see what was what, what methods I had access to, what my value was. Fast forward to first using and IDE and getting sweet auto-completion, and its the same thing when I read some API documentation. It’s good to know what methods you have access to so you know what you can do. Fast forward to ActiveRecord and dynamic finders. You mean I can just say find_by_pants_and_shoes and just because I have both “pants” and “shoes” fields in my database, you know what I’m talking about? Jamis Buck’s definitive explanation solidifed the concept for me and changed the way I think about programming.
I hope to be a HS Math and Computer Science teacher someday so I can be the person to teach kids about things like this and Proof by Induction, rather than dreadful things like Buggles.
In conclusion, I’m glad I could both spout meaningless paragraphs for a page (just like every high school teacher I hated) AND just write about how great I think Rails is (just like every Rails blogger I hate) I guess the takeaway is that
NoMethodError: undefined method `invoke_method_missing_for_problem_solving' for "love"
:String from (irb):397
Keep Reading »
3
Definitely a setup, but funny. I can’t find the photo of me with a moustache from when I was working with him. Anyway, for obvious reasons, I’m more inclined to update you on my life via Twitter than here.
Keep Reading »
Comments Off
I found this in my collection of old random files. Fortunately this one was called normalize.php, rather than the numerous asdf7.php or so files I have. Anyway, at the time I had a huge database that was one big table and every field needed to be normalized into its own table. This was for a belongs_to/ has_many. (Although I guess since its in php, you’d refer to them as belongsTo/ hasMany.
Anyway, I’m sure there are hundreds of better ways to do this, but this one is mine, written long ago and resurrected because I needed it.
$DATABASE = "db_name";
$TABLE = "big_table_name";
function exec_query($sql) {
//echo $sql . "\n\n";
$result = mysql_query($sql);
if (!$result) { echo "Could not successfully run query ($sql) from DB: "
. mysql_error(); exit; }
return $result;
}
/* connect to database */
$link = mysql_connect('localhost', 'root', '');
if (!$link) { die('Could not connect: ' . mysql_error()); }
/* connect to db */
$db_selected = mysql_select_db($DATABASE, $link);
if (!$db_selected) { die ('Can\'t use db : ' . mysql_error()); }
/* Get fields and create table for each field name */
$result = exec_query("show fields from $TABLE");
while ($row = mysql_fetch_assoc($result)) {
$drop_result = exec_query("DROP TABLE if exists $row[Field]");
$create_table_query = "CREATE TABLE $row[Field]
(id int(11) not null auto_increment
, title varchar(256) not null
, PRIMARY KEY(id))";
$create_result = exec_query($create_table_query);
// add foreign keys to main table
$alter_result = exec_query("ALTER TABLE $TABLE
ADD COLUMN $row[Field]_id INT(11)");
// get all distinct values
$distinct_values_result = exec_query("SELECT DISTINCT $row[Field]
FROM $TABLE ORDER BY $row[Field]");
while ($distinct_values_row = mysql_fetch_row($distinct_values_result)) {
// add all data to newly created tables
$insert_data_result = exec_query("INSERT INTO $row[Field]
SET title = '$distinct_values_row[0]'");
$inserted_id = mysql_insert_id();
// now update main table to reference newly created indices
$update_big_table = "UPDATE $TABLE SET $row[Field]_id = '$inserted_id'
WHERE $row[Field] = '$distinct_values_row[0]'";
$update_big_table_result = exec_query($update_big_table);
// then we can delete manually the old columns.
}
}
Keep Reading »
Comments Off
that I was reminded of because my DVR records every old episode of The Office.
Unfortunately www.creedthoughts.gov.www\creedthoughts [link is real] is updated more often than Dwight Schrute’s blog.
Keep Reading » Comments OffEarlier I bitched about not feeling involved in any *real* community here in Columbus. But it felt *great* to be in a normal schedule with cool work. But even more invigorating was tonight’s Columbus Coworking meetup at Junctionview Studios. Bryce put together a great summary of what has been done so far and in addition to some great ideas going forward, even better we have a plan of action.
Location tbd, but next Friday (March 14) we will all be converging at some location for our first test co-work.
Please join the Google Group or follow Corkboard on Twitter for more info.
Also, the best part was meeting Adam Brouillette who shared the impressively ambitious plans for Simple Studios, to create a new 30,000+ sqft art/ performance/ gallery/ work space in Downtown Columbus.
Ok, I’m getting more and more excited about Ohio every day. Tomorrow I’m driving up to Akron to explore and meet with a prospective client!
Keep Reading » 2At last months Columbus Ruby Brigade Meeting, Mike Culver was demonstrating Amazon’s Web Services and mentioned start-up Heroku, which has instant Rails deployment, full ruby console, control over your own gems, project snapshots and rollbacks, etc. And its of course build on the Amazon Elastic Compute Cloud.
I have invites!
If you are interested, please leave a comment and I’ll send one to your email address. New friends welcome!
Keep Reading » 2Via craigslist, timing and luck I’ve been working with a great team of people at Huber+co. They have a great office a short bike ride away in the Arena District. I honestly have no idea how long I’ll be working on this project, it could very well be finished tomorrow.
It’s been fun being back in the swing of working in an office with interesting, creative people.
Keep Reading » Comments OffI’ve felt invisible recently, which has been reflected in my online status, communication with most people, and in my reflection not appearing in any mirrors. Ok, maybe that last one was a lie, but I have been struggling quite a bit lately.
Since leaving my last great job, I’ve been bouncing around a lot, not really knowing what I’ve been looking for and not finding it. I HAVE worked with some great people and on some great projects but have lost my ability to focus on my strengths and set goals.
I’ve started and stopped numerous projects, felt alienated by people as well as alienated others. Anyway, I hit bottom just over a week ago. If I haven’t been in contact at all since then, the only excuse I can offer is that I have been completely self-indulgent and can only ask for forgiveness. It got so bad I even considered becoming religious. HA!
I have been living in the internet and aside from very few people have felt l haven’t found somebody to wink and nod with about the absurdity of life (in Ohio. – Ed.)
I have accepted my entire lack of business acumen and completely forgotten about my ability to be funny. Sorry for complaining, but I’m seeking forgiveness from the internet. I’ll now resume life as it was. And I actually do have a lot of things to show for my time freelancing. I haven’t shared it all, but I’ve been working a lot on some upcoming projects.
So I’m here, I’m sorry and I’m recommitted to enjoying life in Columbus and on the internet. In the words of a good friend of mine: “Man Up Tyler!”
I love you all and don’t forget it.
Keep Reading » 4