August 27th, 2008

food for thought

Warning: picking bottoms on stocks is dumb, so don't try it.

I saw an interesting list of 50 SPX stocks that have lost 50% of their value since the S&P 500 high last October. From that list, I culled the stocks I have on my Google Finance "watchlist" - these aren't stocks I necessarily bought, but I added to do some more research. From that list, I culled out the really bad apples (ones where I believe macro trends are just going to crush them, which includes almost all financials, newspapers, and telecoms).

The final list is: TIE, WM, ETFC, VLO, AMD, and GM. (WM is a financial, but I left it on for sentimental reasons). I wonder if a basket of these stocks would outperform the S&P 500 or not.

Posted by roy at 10:44 PM in Finances | Add a comment

August 26th, 2008

i have now been alive for 9,039 days.

I'm not big on celebrating birthdays, but I may make a big deal out of my 10,000th day (it falls during your 27th year).

Posted by roy at 11:33 PM in Ramblings | 2 Comments

mic check. one. two.

a wha wha whaaatttttt?

mic check. one. two.

live keeps truckin' on. one battle at a time - you fight and move on. and on and on.

. . .

growing pains at mindtouch hurt, but they're necessary. i'm doing my best to adjust and make sure things run smoothly, but 'tis a tough job. i've been getting increasingly frustrated with a bunch of people, who are misconstruing my tapped-out resources as invitations to work around me. i've been calling people out on it a lot lately, and unfortunately i will have to continue to do so. if you ever wonder how the perception of asshole managers are made, i'm pretty sure this is it. the problem is, as always, information assymetry: i know why someone will have to be blocked, or a particular process is used. but others, who don't have the benefit of interfacing with the rest of the team (and thus knowing the goals of the team), have only their self-interest to guide their decision making. i tried to fix this problem first by using weekly all-hands meetings, but those meetings quickly degraded in value as people used them just to make a laundry list of things they worked on - and again, not their fault! whoever knows the whole story should be weaving it, not the individual strands. le sigh. 

voiced some concerns about the direction of the company (i'm in total sync with the engineering team, but out of sync with everybody else) today - good to air those out. as always, i'm so heads-down dealing with ops that i'm afraid that by skipping out on a few strategy meetings, we'll end up committed to another monstrosity of a project ... the echo chamber is a dangerous place.

historically speaking, i'm the guy who ended up cleaning up the mess made by other people. just once i'd like to be the guy who makes the mess and have somebody else deal with it ... that'd be so nice. (of course, i do this unintentionally, because i have the dev skills of a blind monkey)

quality in software is always a concern - i always wondered why big companies let shitty software get developed - i can see why it happens now, and how we could easily end up down that path. awareness is the first step, though ... so let's hope i can continue to have the energy to drive the team to build the best product possible, release after release.

 

generally speaking, when you look to invest in assets, you want to buy the best of breed. the best of breeds give you the best returns. (violating many rules of logic) i'm going to apply the same notion to software: the best of breed software is worth exponentially more than the mediocre ones. so i stand firmly in the corner, in full belief that the best thing i can do for mindtouch is to continue to stand up for the excellent of the engineering team, and not to compromise those goals for short-term gains. 

Posted by roy at 04:54 AM | Add a comment

August 24th, 2008

flobots - handlebars

I had originally heard Flobots' "Handlebars" a couple of months ago, but it was only today I checked out the music video. The video is well done, as it plays off the song's meanings:

The rock/rap with the Cake feel is quite nice...

Posted by roy at 08:51 PM in Music | Add a comment

Fun with databases / tabulas 2.0!

When I started Tabulas, I literally knew nothing about best programming practices. All I was interested in was to see how hard it would be make something that was better than Xanga and LiveJournal. Looking back, that naivete about writing webapps was a really good thing in keeping me focused (nowadays, all my "knowledge" about the potential pitfalls about writing/deploying a webapp really hinder my abilities to start up new projects).

So, over the past few years, I've been slowly phasing out "bad" code (written back in '04 when I knew nothing!) in favor of "good" code (code which still has a shelf-life of maybe another six months before I refactor it again). Last week, I finally disabled http://my.tabulas.com/, the old control panel. That means all users are now using the new control panel; coupled with the new front-end, this is finally the Tabulas 2.0 I wrote about back in 2004/2005 (if you're keeping count, this was the third 2.0 version that was promised). (The next step would be to start implementing the promised 2.1 features)

Now that I've finally consolidated the codebase to one single codepath (yes, it was running multiple copies all over the place before!), the next step is the database cleanup.

Right now, I have 96 tables; most which I don't know what they're doing. The naming schema for tables is all over the place, too. For example, the old users table:

CREATE TABLE `users` (
  `userid` mediumint(8) unsigned NOT NULL auto_increment,
  `username` varchar(16) NOT NULL default '',
  `user_pass` varchar(32) NOT NULL default '',
  `user_pass_temp` varchar(32) NOT NULL default '',
  `password` varchar(12) NOT NULL default '',
  `password2` varchar(32) NOT NULL default '',
  `email` varchar(64) NOT NULL default '',
  `joined` date NOT NULL default '0000-00-00',
  `code` varchar(11) NOT NULL default '0',
  `status` tinyint(1) NOT NULL default '0',
  `lastlogin` date NOT NULL default '0000-00-00',
  `totalFriends` smallint(5) unsigned NOT NULL default '0',
  `userHash` varchar(32) NOT NULL default '',
  `server` varchar(25) NOT NULL default 'jbiel.tabulas.com',
  `suspended` tinyint(1) NOT NULL default '0',
  `user_history` text NOT NULL,
  `user_cache` text NOT NULL,
  `user_option` text NOT NULL,
  `user_upgrade` tinyint(1) NOT NULL default '0',
  `user_ads` tinyint(1) NOT NULL default '0',
  `userStats` text NOT NULL,
  `userType` tinyint(1) NOT NULL default '0',
  `userHost` tinyint(1) NOT NULL default '0',
  `userSalt` varchar(32) NOT NULL default '',
  `userAccounts` text NOT NULL,
  `userIconId` int(10) unsigned default NULL,
  PRIMARY KEY  (`userid`),
  KEY `username` (`username`),
  KEY `email` (`email`)
)

Oh yeah. Notice the passwords duplication? (That was when I realized storing plaintext passwords was bad - don't worry, there hasn't been any data stored there for a while as I wiped them, but I left the columns active as I didn't want to dive into my old code and remove the column calls). Notice the complete lack of standard naming of the columns? Nice. (Not)

Fortunately, foreseeing this work item, all the current code goes through a layer of abstraction which lets me change the table/column names dynamically once in the code, so updating these tables/columns are relatively easy for me to do.

So today, I cleaned up the users table by naming everything consistently and dropping unused columns. How much data was redundant and unused?

root@host [~/mysql_backups]# ls -al tabulas.users*
-rw-r--r--  1 root root 18432778 Aug 24 21:11 tabulas.users.new.sql
-rw-r--r--  1 root root 26496439 Aug 24 20:53 tabulas.users.sql

... about 30%. crazy.gif God, I'm such a horrible developer. Here's the final structure:

CREATE TABLE `users` (
`user_id` mediumint(8) unsigned NOT NULL auto_increment,
`user_name` varchar(16) NOT NULL default '',
`user_email` varchar(64) NOT NULL default '',
`user_status` tinyint(1) NOT NULL default '0',
`user_suspended` tinyint(1) NOT NULL default '0',
`user_created` date NOT NULL default '0000-00-00',
`user_updated` date NOT NULL default '0000-00-00',
`user_host` tinyint(1) NOT NULL default '0',
`user_salt` varchar(32) NOT NULL default '',
`user_hash` varchar(32) NOT NULL default '',
`user_pass` varchar(32) NOT NULL default '',
`user_pass_temp` varchar(32) NOT NULL default '',
`user_logins` text NOT NULL,
`user_options` text NOT NULL,
`user_icon_id` int(10) unsigned default NULL,
PRIMARY KEY (`user_id`),
KEY `user_name` (`user_name`),
KEY `user_email` (`user_email`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
 

Expect a lot more of these posts over the coming weeks as I tackle these changes bit by bit.

And if Tabulas is throwing any errors, let me know.

Posted by roy at 02:36 PM in Web Development, Tabulas | 8 Comments
« Newer | »