Author Topic: [Java] CountMyFiles  (Read 2715 times)

0 Members and 2 Guests are viewing this topic.

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
[Java] CountMyFiles
« on: September 12, 2011, 12:51:26 pm »
Ok, another version of "CountMyFiles". I've written it in Pascal, Delphi, Python and now Java :D
Nice little project to get you started on the language.

Code: http://newage.ql.lt/projects/java/CountMyFiles.java

Usage:
javac CountMyFiles.java
java CountMyFiles PATH files/folders
« Last Edit: September 12, 2011, 12:56:52 pm by Kulverstukas »

Offline petermlm

  • Knight
  • **
  • Posts: 226
  • Cookies: 7
  • Information is Power
    • View Profile
    • Security Check
Re: [Java] CountMyFiles
« Reply #1 on: September 12, 2011, 01:16:40 pm »
I've written it in Pascal, Delphi, Python and now Java :D

That is great! Do you use any method to port the codes or do you write every thing from scratch?

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: [Java] CountMyFiles
« Reply #2 on: September 12, 2011, 02:05:53 pm »
That is great! Do you use any method to port the codes or do you write every thing from scratch?
Wouldn't be much of a learning if I were to just port codes... I just have the idea how it should work and I write it from scratch.

Offline petermlm

  • Knight
  • **
  • Posts: 226
  • Cookies: 7
  • Information is Power
    • View Profile
    • Security Check
Re: [Java] CountMyFiles
« Reply #3 on: September 12, 2011, 02:11:27 pm »
Wouldn't be much of a learning if I were to just port codes... I just have the idea how it should work and I write it from scratch.

I thought as must, lol.

xor

  • Guest
Re: [Java] CountMyFiles
« Reply #4 on: September 12, 2011, 02:18:58 pm »
Tip #1: Don't let your lines go over 80 characters wide.
Tip #2: Don't break up your functions using //================ use 2-3 carriage returns
Tip #3: Functions should start with a lower case letter and capitalize the first letter of each word.
Tip #4: package names should ALWAYS be in lower case.
Tip #5: Class names should be more about what it does rather than what your program is, for example. CountMyFiles becomes FileCounter.
Tip #6: I could think of more, but you're talking to me on the IRC and I'm intrigued...
« Last Edit: September 12, 2011, 02:40:32 pm by xor »