Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Seeking design advice on a Tabulator

Name: Anonymous 2011-01-07 9:53

My Tabulator counts the lines of code, comments, whitespace in a java file.

Usage:
java Tabulator ./SomeCode.java

output:
fname,         #code, #comments, #whitespace, #total
SomeCode.java, 56,    10,        15,          81

My professor wants me to apply this to a directory.
So: java Tabulator .
Would create a text file with all the statistics.
She said to use make to automate the process but after doing some research I found that java can handle the automation alone.
See the DirList example:
http://www.tutorialspoint.com/java/java_file_class.htm

TL;DR Is Make or pure Java better at automating a line counting program?

Name: Anonymous 2011-01-07 9:57

if this is just a routine assignment that gets handed out to everybody i doubt she gives a fuck

Name: Anonymous 2011-01-07 9:59

for f in *; do java Tabulator "$f"; done

Name: Anonymous 2011-01-07 10:01

>>2

It's not a routine assignment. She will use the program to gain insight on her students code. Like if her 2005 students wrote more or less comments than her current students.

Name: Anonymous 2011-01-07 10:06

>>3
What language is this?

Name: Anonymous 2011-01-07 10:20

So this is what we're using in place of actually reviewing students' source code nowadays?

Name: Anonymous 2011-01-07 10:31

>>5
sh(1)

Name: Anonymous 2011-01-07 10:31

>>6
Yes, the future is computing.
Any other questions?

Name: Anonymous 2011-01-07 10:34

>>8
Does she Lisp?

Name: Anonymous 2011-01-07 10:38

>>9
Now that wasn't so hard now was it?
No, she does not use lisp. She wants it written in java because because that's what she teaches in.

Name: Anonymous 2011-01-07 10:47

>>10
Then write it in java.
Pseudocode:

(map (lambda (dir) (map (lambda (file) (tabulator file)) (directory-files dir))) (filter (lambda (dir) (not (equal? dir (directory "..")))) dirs))


Next.

Name: Anonymous 2011-01-07 10:52

>>11
Pseudocode:
if __name__ == "__main__":

I don't know any more than that.

Name: Anonymous 2011-01-07 11:23

>>12

class Thread(threading.Thread):
   def run(s):
       print(s.__one_word__());
   def __over(self):
       self.join()

if __name__ == "__main__":
   thread = Thread(__one_word__ = lambda: """THE FORCED INDENTATION
 OF CODE""")
   thread.start()
   thread._Thread__over()

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List