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

Reputation: 1906 Grandmaster
Group:
Mentors
Active Posts:
3,949 (1.7 per day)
Joined:
11-December 07
Profile Views:
56,026
Last Active:
User is online 29 minutes ago
Currently:
Viewing Board Index

Previous Fields

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

Latest Visitors

Icon   cfoley has not set their status

Posts I've Made

  1. In Topic: [Link] How We Learned to Code

    Posted 17 Apr 2014

    I enjoyed the article very much but I think he missed something important:

    Quote

    Please note that this article is meant for aspiring entrepreneurs and hobbyists - not for anyone looking to make a career out of software development.


    On the contrary, It's also an excellent article for aspiring software developers. The degree will guide you in learning theory but whatever your level, you have to practice building and finishing projects. There is a determination required to see projects through to their conclusion and that stamina has to be built over time.

    Another skill that comes over in the article is winging it, and that's crucially important for building things. How much of what I use do I really understand? Third party libraries? The database? The language? I might have a superficial understanding of each. I might even know how to implement alternatives but in reality I rarely know how anything actually works deep down. It's all guesswork and evolving an increasingly complete mental model.

    Finally, it will put the theory in context. You'll see the point in ADTs, patterns and architecture because you'll be able to relate them to code you have written. You'll be able to see how their use will improve your current and past projects.
  2. In Topic: Not showing lower layer of JlayeredPane

    Posted 16 Apr 2014

    It was mike73 who spotted the issue. Make sure you vote up his post to thank him.
  3. In Topic: Not showing lower layer of JlayeredPane

    Posted 15 Apr 2014

    Don't add a lauout manager like borderlayout. Instead add each panel, set the layer and manually set the size.
  4. In Topic: Layout Help

    Posted 15 Apr 2014

    Its tricky. You have to get the insets and make sure you honour them. Not really worth the hassle.

    The easy way out is to put the panel you draw on inside another one that has the border.
  5. In Topic: Scientific Notation in java

    Posted 15 Apr 2014

    BigDecimal is for times when double doesn't allow enough precision. Try representing 0.10 in a double and you're in trouble! BigDecimal is the standard for currency calculations.

    I would also caution against using Static methods. I've lost count of the number of times I've made a static method and ended up wishing I had made a class. It starts when you want to add extra configuration. In this example it could be the number of significant figures, inclusion of trailing zeros, adding a prefix or suffix, period or comma for the decimal separator, grouping digits in threes. The list goes on. You could just keep adding arguments to the static method but it gets ridiculous after about 4.

    Then you decide that sometimes you want engineering notation instead. If you had made a class (or an interface) you could easily make a subclass that could plug into your program in the same way as the existing one. In fact, this is exactly what Java has already. There is an interface called NumberFormat implemented by DecimalFormat and a couple of others. If you are serious about writing code to format numbers, you should implement NumberFormat and use DecimalDormat to do as much of the heavy lifting as it can.

My Information

Member Title:
Cabbage
Age:
32 years old
Birthday:
April 7, 1982
Gender:
Location:
Glasgow
Forum Leader:
Java
Years Programming:
20

Contact Information

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

Comments

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