{"id":715,"date":"2007-11-27T19:38:30","date_gmt":"2007-11-27T11:38:30","guid":{"rendered":"http:\/\/foxpro.ntsl119.com\/scr\/archives\/715"},"modified":"2007-11-28T23:22:15","modified_gmt":"2007-11-28T15:22:15","slug":"chop-chops","status":"publish","type":"post","link":"https:\/\/foxpro.ntsl119.com\/scr\/archives\/715","title":{"rendered":"CHOP CHOPs"},"content":{"rendered":"<p>Strap yourself in boys, we&#8217;re in for some chop chops.<\/p>\n<p>Chop chops&#8230; these are.<\/p>\n<p>Call it refactoring if you want. <\/p>\n<p>Tweaking.<\/p>\n<p>Straightening out five year old &#8216;funny codes&#8217;. (Though I&#8217;m not sure if it will pass the <a href=\"http:\/\/www.thedailywtf.com\/\" target=\"_blank\">dailyWTF<\/a> criteria.)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/img140.imageshack.us\/img140\/2579\/20071127ils2ad4.jpg\" width=\"420\" height=\"637\"\/><br \/>\n<span class=\"style2\">LIBRARY SYSTEM version 2.001 screenshot<\/span><\/p>\n<p>Four++ years ago a client asked me to continue a three year old project of theirs.<\/p>\n<p>To be completed in seven weeks&#8230; that is.<\/p>\n<p>(The topic of <a href=\"http:\/\/foxpro.ntsl119.com\/scr\/archives\/549\" target=\"_blank\">rushed projects<\/a> have been a recurring item in this blog but no most of our projects are not rushed : )<\/p>\n<p>So seven weeks, I was asked&#8230; if I could do it.<\/p>\n<p>Being a proud programmer back then&#8230; I accepted it. <\/p>\n<p>For pride&#8230; for <a href=\"http:\/\/www.300ondvd.com\/\" target=\"_blank\">glory<\/a>&#8230; for <a href=\"http:\/\/img530.imageshack.us\/my.php?image=bullxf1bi8.jpg\" target=\"_blank\">the challenge<\/a>.<\/p>\n<p>(Payment will even be given a year after. Nine months after to be exact&#8230; so financial motivation was non-existent.) <\/p>\n<p>Plus back then I felt like I was an ultra-bionic coder with 28 fingers and 42 mind-to-fingers 2048-bit <a href=\"http:\/\/www.webopedia.com\/TERM\/B\/bus.html\" target=\"_blank\">internal buses<\/a> that can tap three alternate universes for quantum fueled code-pounding mojos.<\/p>\n<p>And I have FoxPro&#8230; of course.<\/p>\n<p>VFP6 was the main weapon back then.<\/p>\n<p>The client&#8217;s old project was done in Visual Basic 5 if I&#8217;m not mistaken. (With multiple ocx files) <\/p>\n<p>So if you&#8217;re me faced with a rushed project to be finished in seven weeks&#8230; the best thing to do first is of course to convert things to Visual FoxPro.<\/p>\n<p>I knew VB back then&#8230; but I&#8217;m more familiar with the Fox.<\/p>\n<p>In pressured situations you tend to go with those you are familiar with.<\/p>\n<p>Instincts.<\/p>\n<p>Raw <a href=\"http:\/\/www.marveldirectory.com\/individuals\/w\/wolverine.htm\" target=\"_blank\">slashin&#8217;<\/a> instincts.<\/p>\n<p>&#8230;<\/p>\n<p>Imagine this. You&#8217;re fighting a swarm of <a href=\"http:\/\/img505.imageshack.us\/my.php?image=hansingdogalien002yk9.jpg\" target=\"_blank\">droolin&#8217; aliens<\/a>. You have a choice between an advanced AKzVROOMzerg 19281 rifle with 1029 technicolored (and <a href=\"http:\/\/www.microsoft.com\" target=\"_blank\">beautifully gradient<\/a>) buttons you don&#8217;t understand but can wipe out 200 aliens in one blow. <\/p>\n<p>Or an old used knife purchased in <a href=\"http:\/\/cgi.ebay.com\/Rambo-1st-Blood-and-Rambo-III-knives_W0QQitemZ140181651216QQihZ004QQcategoryZ43337QQssPageNameZWDVWQQrdZ1QQcmdZViewItem\" target=\"_blank\">eBay<\/a>. <\/p>\n<p>If aliens are miles away you might try fidgeting with the rifle.<\/p>\n<p>Read the effin&#8217; manuals perhaps.<\/p>\n<p>But if the aliens are just three feet away you&#8217;d grab the knife.<\/p>\n<p>Instincts dictate you do do so. <\/p>\n<p>(I know humans learn something from watching <a href=\"http:\/\/img504.imageshack.us\/my.php?image=posterramboit1.jpg\" target=\"_blank\">Rambo films<\/a>. (<a href=\"http:\/\/www.imdb.com\/title\/tt0107144\/\" target=\"_blank\">Charlie Sheen spoof film<\/a> included.))<\/p>\n<p>FoxPro is that knife.<\/p>\n<p>&#8230;<\/p>\n<p>Going back to that project and aliens aside, I did retain the structure of the old databases. <\/p>\n<p>Besides it contains a lot of data already. <\/p>\n<p>I carefully imported them into independent FoxPro tables.<\/p>\n<p>&#8230;<\/p>\n<p>Fast forward to June 2007 and 8 clients later&#8230; I&#8217;ve decided it&#8217;s about time for an upgrade.<\/p>\n<p>There were of course updates&#8230; fixes and all on version 1.00 but I want a major change.<\/p>\n<p>Including a rehaul of those imported databases.<\/p>\n<p>A complete restructure from top to bottom.<\/p>\n<p>I don&#8217;t feel like I&#8217;m that ultra-bionic coder anymore but I did learn a lot.<\/p>\n<p>Slashing instincts are still there though.<\/p>\n<p>Plus we have new coding conventions.<\/p>\n<p>And qs and I (who now codes with me (sometimes codes more than me)) have developed new engines. New frameworks.<\/p>\n<p>(With new bugs. More advanced bugs. Bugs unseen to the <a href=\"http:\/\/www.disney.com\/?BAHAHAHANoNEKKIDHere!\" target=\"_blank\">naked<\/a> user&#8217;s eye.)<\/p>\n<p>So I started coding and restructuring. Laughing in between at old funny codes and flows. <\/p>\n<p>Mid-August a client asked for a feature. A needed feature.<\/p>\n<p>Thinking it was just easy we accepted it.<\/p>\n<p>I fired up two logs. One for version 1.00 and one for version 2.00 with a sub part in the old log that points out to &#8216;codes\/modules\/forms modified in version 1.00 that are to be modified in version 2.00&#8217;.<\/p>\n<p>Three months after I&#8217;m still working on that feature. <\/p>\n<p>On both versions.<\/p>\n<p>Pingpong-ing codes and chopped PRG files in between projects. A major change of database structure also made things harder. Think of the buffered variable names and flows I have to store in my mind to accomodate simultaneous processes.<\/p>\n<p>Plus I&#8217;m already used to the new framework\/engine of ours that uses a common library\/codes folder. Much easier for lazy  coders like me. <\/p>\n<p>And I&#8217;m older now.<\/p>\n<p>And unfocused.<\/p>\n<p>I&#8217;m older and unfocused.<\/p>\n<p>And more whiny.<\/p>\n<p>AaaaaaRRGH.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Strap yourself in boys, we&#8217;re in for some chop chops. Chop chops&#8230; these are. Call it refactoring if you want. Tweaking. Straightening out five year old &#8216;funny codes&#8217;. (Though I&#8217;m not sure if it will pass the dailyWTF criteria.) LIBRARY SYSTEM version 2.001 screenshot Four++ years ago a client asked me to continue a three [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,10],"tags":[],"class_list":["post-715","post","type-post","status-publish","format-standard","hentry","category-alieninvasion","category-workblog"],"_links":{"self":[{"href":"https:\/\/foxpro.ntsl119.com\/scr\/wp-json\/wp\/v2\/posts\/715","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/foxpro.ntsl119.com\/scr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/foxpro.ntsl119.com\/scr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/foxpro.ntsl119.com\/scr\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/foxpro.ntsl119.com\/scr\/wp-json\/wp\/v2\/comments?post=715"}],"version-history":[{"count":0,"href":"https:\/\/foxpro.ntsl119.com\/scr\/wp-json\/wp\/v2\/posts\/715\/revisions"}],"wp:attachment":[{"href":"https:\/\/foxpro.ntsl119.com\/scr\/wp-json\/wp\/v2\/media?parent=715"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/foxpro.ntsl119.com\/scr\/wp-json\/wp\/v2\/categories?post=715"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/foxpro.ntsl119.com\/scr\/wp-json\/wp\/v2\/tags?post=715"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}