cfoley's Profile User Rating: -----

Reputation: 2007 Grandmaster
Active Posts:
4,171 (1.68 per day)
11-December 07
Profile Views:
Last Active:
User is offline Today, 04:30 PM

Previous Fields

OS Preference:
Who Cares
Favorite Browser:
Who Cares
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
Expert In:

Latest Visitors

Icon   cfoley has not set their status

Posts I've Made

  1. In Topic: Running time of algorithm

    Posted 23 Sep 2014

    I think you were closer with sorting.
  2. In Topic: (noob Question) Java best program to create programms?

    Posted 23 Sep 2014

    I program in Java every day and use Eclipse. It has its rough edges but I can work really quickly with it. The killer features for me are the refactoring tools and suggestions for compile errors. The latter really speeds me up because I can use it to generate a lot of class definitions, method signatures, imports, variable declarations, etc. It's the same tool I have seen students at university use to maul their code into a horrible broken mess. You really need to know what you are doing with it.

    I also have a hobby of learning new languages (Check my sig links). Most languages come with a REPL (not Java) which lets me play with the language and get immediate feedback on how it works and weather I am making mistakes. I usually spend one tutorial there and then go back whenever I want to try something out quickly.

    Beyond the first tutorial I use a text editor to edit my code and the console to compile and run programs. Part of learning a language is becoming familiar with the tools like the compiler and knowing how to make it run on the computer. If an IDE turns these things into magic then I won't really know the language and I would become dependant on the IDE too.

    Some of the languages I end up using to write bigger projects. At this point, I will look for a better tool. I'm very happy with Eclipse for Java. When I work in VB.NET, I use VisualStudio. For Ruby or Python, I haven't found anything I like better than my editor and console so I stick with that.

    For learning Java, I suggest a text editor and the console. My favourite is SublimeText. You can configure it to compile and launch your program at a keystroke so you won't be spending much time in the console. When your programs reach a certain size, that's when Eclipse might be worth thinking about.
  3. In Topic: static class should have static variable?

    Posted 23 Sep 2014

    No, it's not mandatory. You can create instances of static classes. For example:

    public class StaticClassMain {
        static class Sub{
            String str="Example 1";
        public static void main(String[] args) {
            Sub mySub = new Sub();

    Inner classes have their uses but they are generally best avoided. I've made a lot of them in my time programming Java. Most of them were mistakes where I would have been better putting a separate class in a new file.
  4. In Topic: project for developing my skills in OOP

    Posted 23 Sep 2014


    Model real-world items first, like a toaster

    Actually, I've been wondering what this might look like. Even when writing OO code my program has a purpose. A game's purpose is obvious: you can play it for fun.

    "Toaster" doesn't have the same obvious purpose. I don't think I'm being facetious either. You could write a class that has a setter for the timer, a method to "insert the bread", another to retrieve it. At the end you have a class. You might hook it into something that prints "now you have toast" on the console but it's all a bit contrived.

    Now, if you had the API for a hardware controller that would be a different matter. You could program it to pop toast out at the perfect time in the morning, use a sensor to make sure it doesn't burn and tweet critical toast complications to the universe. In this case, the purpose would drive the class design and you would end up with something a bit different to the above.

    The first litmus test for a design is if the program works. The second is if maintenance in the face of changing requirements is easy. It's all about the purpose of the program.
  5. In Topic: project for developing my skills in OOP

    Posted 23 Sep 2014

    Games are fine. If you don't do GUIs then start in the console. How about this sequence if you want to start easy:

    Coin toss
    Guess the number (being told higher or lower)
    Interactive towers of hanoi
    Tic Tac Toe
    Connect Four

    Most of these you COULD do as a single main method. The challenge is to do them with a nice OO design.

My Information

Member Title:
32 years old
April 7, 1982
Forum Leader:
Years Programming:

Contact Information

Click here to e-mail me
Website URL:
Website URL  http://


Page 1 of 1
  1. Photo

    burakaltr Icon

    06 Mar 2013 - 18:18
    Thanks for Your Precious Input. I Found the character counting thing very bedazzling. I have the code to it that I wrote Myself, but it took me Long to find a subtle Algorithm :)
  2. Photo

    cfoley Icon

    18 Oct 2011 - 03:29
    Cheers! The next one is in progress, but I'm having to learn and write some programs first. It's going to take a little time...
  3. Photo

    Dogstopper Icon

    18 Oct 2011 - 03:24
    Nice blog. Can't wait to see more
  4. Photo

    ayaz 786123 Icon

    25 Feb 2011 - 06:49
    have a nice day sir
  5. Photo

    cfoley Icon

    16 Feb 2011 - 17:26
    Oooh thanks! Your comment is the first I heard!
  6. Photo

    m-e-g-a-z Icon

    16 Feb 2011 - 15:34
    Congrats on becoming a Forum Leader! :)
  7. Photo

    Dogstopper Icon

    08 Jan 2011 - 23:49
    "Cabbage" is much better! :D
  8. Photo

    cfoley Icon

    06 Jan 2011 - 16:19
    Cheers dude!
  9. Photo

    Dogstopper Icon

    06 Jan 2011 - 14:36
    "Purple DIC-headed Warrior" doesn't quite apply now that you got the promotion. Well done!
  10. Photo

    DaneAU Icon

    08 Sep 2010 - 09:19
    "cfoley has no profile comments yet. Why not say hello?"
    I don't have many comments either, so i am only doing what the thingy below said to do, hello cfoley and thanks for the thanks :)
Page 1 of 1