{"id":603,"date":"2005-08-16T11:48:05","date_gmt":"2005-08-16T15:48:05","guid":{"rendered":"http:\/\/www.starkeith.net\/coredump\/?p=603"},"modified":"2009-04-12T20:56:09","modified_gmt":"2009-04-13T00:56:09","slug":"line-counting","status":"publish","type":"post","link":"https:\/\/www.starkeith.net\/coredump\/2005\/08\/16\/line-counting\/","title":{"rendered":"Line Counting"},"content":{"rendered":"<p>This morning I was curious as to how many actual, real lines of code there were in my company&#8217;s product. So, being the geek that I am, I wrote a program to find out. And because I like to share, I&#8217;m making the program available <a href=\"http:\/\/www.starkeith.net\/coredump\/files\/lineCount.zip\">here<\/a>.<\/p>\n<p>This is a Visual Basic 6.0 program; so be sure to have the necessary VB runtimes installed on your system before you try to run it. Obviously, as well, this will only run on Windows PCs&#8230; sorry Mac &#038; Linux people!<\/p>\n<p>The program allows you to select a single VB project file, which it will then parse for all of its component files. It will then count the lines of code (non-blank, non-comment) in the files &#038; add it up and give it to you as a total. You can check off the box to keep a running total of all lines in several projects; but VB is limited (without some fancy libraries that I was too lazy to include) to integers of something in the neighborhood of 36,000 &#8211; if your projects have more lines then that, you&#8217;ll get a run-time error 6 &#8211; overflow error, and the program will crash. (No, there&#8217;s no error checking &#8211; it was a quick &#038; dirty utility for my use!)<\/p>\n<p>Anyway, feel free to use if it you want. And in case you were wondering&#8230; my program currently has 72,145 lines of code. YIKES! <\/p>\n","protected":false},"excerpt":{"rendered":"<p>My own free program to count the number of lines of code (LOC) in your VB6 project.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"webmentions_disabled_pings":false,"webmentions_disabled":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_post_was_ever_published":false},"categories":[5],"tags":[],"class_list":["post-603","post","type-post","status-publish","format-standard","hentry","category-technology","entry"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pimUj-9J","jetpack-related-posts":[{"id":177,"url":"https:\/\/www.starkeith.net\/coredump\/2004\/07\/27\/how-to-hack\/","url_meta":{"origin":603,"position":0},"title":"&#8220;How To Hack&#8221;","author":"Keith Survell","date":"July 27, 2004","format":false,"excerpt":"\"How To Hack,\" a brief guide to hacking (the way of thinking more than anything else) by: Keith M. Survell.","rel":"","context":"In &quot;personal&quot;","block_context":{"text":"personal","link":"https:\/\/www.starkeith.net\/coredump\/category\/personal\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":728,"url":"https:\/\/www.starkeith.net\/coredump\/2006\/04\/18\/728\/","url_meta":{"origin":603,"position":1},"title":"Upgrading Languages","author":"Keith Survell","date":"April 18, 2006","format":false,"excerpt":"I agree with this: \"If you spend the money to upgrade to VB.NET, well, you just spent a lot of money to stand still.\"","rel":"","context":"In &quot;tech&quot;","block_context":{"text":"tech","link":"https:\/\/www.starkeith.net\/coredump\/category\/technology\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1283,"url":"https:\/\/www.starkeith.net\/coredump\/2008\/08\/11\/music-to-code-by\/","url_meta":{"origin":603,"position":2},"title":"Music to Code By","author":"Keith Survell","date":"August 11, 2008","format":false,"excerpt":"I read a post over at Coding Horror today about \"Music to (Not) Code By,\" and it got me thinking about the music I code by - which, let me just say, is not anything like the music mentioned in Jeff's article! There's always been a sort of unspoken rule\u2026","rel":"","context":"In &quot;My Life&quot;","block_context":{"text":"My Life","link":"https:\/\/www.starkeith.net\/coredump\/category\/personal\/my-life\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":954,"url":"https:\/\/www.starkeith.net\/coredump\/2007\/10\/27\/a-christmas-countdown-timer\/","url_meta":{"origin":603,"position":3},"title":"A Christmas Countdown Timer","author":"Keith Survell","date":"October 27, 2007","format":false,"excerpt":"Yes, that's right. A silly little program, really, hey, you might find it amusing.","rel":"","context":"In &quot;fun stuff&quot;","block_context":{"text":"fun stuff","link":"https:\/\/www.starkeith.net\/coredump\/category\/fun-stuff\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1526,"url":"https:\/\/www.starkeith.net\/coredump\/2008\/12\/04\/dont-reboot-just-logoff\/","url_meta":{"origin":603,"position":4},"title":"Don&#8217;t Reboot &#8211; Just Logoff","author":"Keith Survell","date":"December 4, 2008","format":false,"excerpt":"A while ago I wrote about how Windows still works just fine for me, and I wanted to follow up on that. Today I was having some problems opening new windows - from any program. Being a programmer myself and knowing a thing or two about how Windows works on\u2026","rel":"","context":"In &quot;tech&quot;","block_context":{"text":"tech","link":"https:\/\/www.starkeith.net\/coredump\/category\/technology\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.starkeith.net\/coredump\/wp-content\/uploads\/\/2008\/12\/exit.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1277,"url":"https:\/\/www.starkeith.net\/coredump\/2008\/08\/09\/anti-virus-that-doesnt-suck\/","url_meta":{"origin":603,"position":5},"title":"Anti-Virus that doesn&#8217;t Suck","author":"Keith Survell","date":"August 9, 2008","format":false,"excerpt":"Lately I've been trying to find anti-virus software that doesn't suck. And I mean \"suck\" in both senses of the word - as in: Isn't poorly designed software that doesn't perform its function (detecting viruses) well, and Doesn't suck up my system resources every time it scans a file (or\u2026","rel":"","context":"In &quot;tech&quot;","block_context":{"text":"tech","link":"https:\/\/www.starkeith.net\/coredump\/category\/technology\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.starkeith.net\/coredump\/wp-json\/wp\/v2\/posts\/603","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.starkeith.net\/coredump\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.starkeith.net\/coredump\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.starkeith.net\/coredump\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.starkeith.net\/coredump\/wp-json\/wp\/v2\/comments?post=603"}],"version-history":[{"count":0,"href":"https:\/\/www.starkeith.net\/coredump\/wp-json\/wp\/v2\/posts\/603\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.starkeith.net\/coredump\/wp-json\/wp\/v2\/media?parent=603"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.starkeith.net\/coredump\/wp-json\/wp\/v2\/categories?post=603"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.starkeith.net\/coredump\/wp-json\/wp\/v2\/tags?post=603"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}