Best Tips for Java Beginners?

Hello all,
I study at Open United kingdom (Information Technology), and started to study basics of Java.
We use Netbeans, & I wanted to ask experts here what's the best way to develop myself at Java programming?
"Practice, Practice, & Practice...", thats what the material says.. But I need some sources to guide me with simple Java programs to start to practice with...
so please share any tip may be useful to Java beginners from your own experience.
Thanks.

Tips for beginners that I have taught in the past and from me:
0 - The debugger is your friend. Learn to use it, before you lean any more Java. REALLY!!!
1 - Do NOT use the GUI development tool in your IDE, Code it yourself.
2 - Read the Java Tutorials.
3 - Java arrays begin with index 0.
4 - Do NOT confuse leaning Java with learning to program. They are 2 distinct things.
The language is a tool, but knowing how to program is a skill that will apply to many different tools.
5 - There are more languages than Java, keep in mind each, including Java, were created for different tasks.
6 - Develop your own style.
7 - You are never done learning. NEVER.
8 - Don't be afraid to modify your style, when you see something elegant, adopt it, make it part of your style.
9 - If you're not having fun, you're doing the wrong thing.
10 - Math is a major part of programming: you can never have too many Math skills.
11 - Embrace the Java philosophy... write once, run anywhere a JVM exists.
12 - Dumb code is actually better: don't get overly involved in optimizing your code--write it clean--Java will do the rest.
13 - Learn to use your profiler, for when you really need to see if you can optimize. The problem is usually not where you think.
14 - No matter how good you are, someone is always better and faster--when you encounter them, learn from what they do and use the good parts.
15 - 800 lines of buggy code is not as good as 50 lines of clean, well designed code.
16 - Your teacher is not always right, but they give you the grades.
17 - Your boss may be an idiot, but he had the good sense, or lapse there of, to offer you a job and you accepted. He's your boss now, act like it, and help him look good--you'll go farther with a lot less stress. Also remember you future boss may want to contact him for a reference.

Similar Messages

  • Best practice for java script placement on a BC page?

    Hi guys just a general ask about where the best place for java script is on a BC page.
    I just watched the this very good video on optimization http://bcgurus.com/tutorials/how-to-do-website-performance-optimization and in it it says how you should try and load the scripts at the bottom of the page so that it loads quicker.
    now I want to do this but with it being a BC site i dont know if certain scripts have to be in the head of the doc. For instance the validate script I have? Does anyone know what I can and cant move from the head?
    I was going to do what kiyuco like to practice and add all my scripts to a content holder and then add that to my pages/templates. Will BC like me adding this to the bottom of the page and not the head?
    Thanks
    Dave

    http://forums.adobe.com/docs/DOC-2964

  • " Why not Emacs Be the best editor for java"

    hai friends,
    iam using emacs editor for java. i think it is the best editor for java available
    for free of cost.
    we can easily customize it based on ur needs
    we can even customize the compilation and run option with single key stroke.
    and it has many interesting and useful features like shell, bsh, cvs customization,telnet
    and a lot more....
    many software concerns had made emacs as thier offical java editor
    i donot think anybody in this world who had used the emacs will go for some other editor
    and i do want to know from u all that whether i was wrong . and
    is there any other editor which can be better than emacs
    if so give me valid reasons
    get back to me if u are not aware of emacs features
    regards
    g.kamal

    I agree with you 100% on linux side, but in
    windows(tm) there are even better editors. I
    personally use MED in windows. After trying dozens of
    different editors in linux I ended up using emacs, it
    sure is the best editor in linux (for Java atleast).
    There are still some things bugging me, for an example
    I would like the "end" button to move the cursor to
    the end of the line instead of EOF.
    I donot understand why ur saying that the "end" button is not moving the cursor to the
    end of the line
    it works fine in my machine
    plz elaborate what more features u want, bcas it may be there in emacs , but u may not have that
    much awareness in it.
    regards
    kamal

  • What are the BEST Books and Best websites for java biginners?

    Dear All,
    What are the BEST Books and Best websites for java biginners-Especially for fast learning.
    Thnaks
    KMK

    This is my standard reply:
    [Sun's basic Java tutorial|http://java.sun.com/docs/books/tutorial/]
    [Sun's New To Java Center|http://java.sun.com/learning/new2java/index.html]
    Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.
    jGuru
    A general Java resource site. Includes FAQs, forums, courses, more.
    JavaRanch
    To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.
    [Yawmarks List|http://forums.devshed.com/java-help-9/resources-for-learning-java-249225.html]
    [The Java Developers Almanac|http://www.amazon.com/exec/obidos/tg/detail/-/0201752808?v=glance]
    [http://javaalmanac.com|http://javaalmanac.com]
    Bruce Eckel's [Thinking in Java(Available online.)|http://mindview.net/Books/DownloadSites]
    Joshua Bloch's [Effective Java|http://www.amazon.co.uk/exec/obidos/Author=Bloch,%20Josh]
    Bert Bates and Kathy Sierra's [Head First Java|http://www.amazon.com/exec/obidos/tg/detail/-/0596004656?v=glance ]
    James Gosling's [The Java Programming Language|http://www.bookpool.com/sm/0321349806]
    Gosling is the creator of Java. It doesn't get much more authoritative than this.
    Joshua Bloch and Neal Gafter [Java Puzzlers.|http://www.javapuzzlers.com/]

  • New tips for Java developers

    Hello to all Java developers!
    I’m new to the forum and I wanna say all of you hi. Wanna give you a link to one very interesting article on java development (Video Conversion System Implementation)
    http://techzone.enterra-inc.com/video/video-conversion-system-implementation/
    I want to discuss it with you here.

    In what way is that a tip for Java Developers? In what way is it related to Java Programming?

  • Calendar - best tips for categories

    I'm relatively new to Bberry.  Have a Storm2 now.  I use Outlook 2007 for my calendar, personal and business.  I'm a court reporter and enter in my Outlook calendar the court hearings for 3 or 4 different judges.  I use the color categories to easily track which hearing is before which judge.  Of course, my personal calendar events are also categorized.   
    I've come to learn that there's no way to get those categories to sync with my Storm.
    So...I'm looking for advice from those of you who also keep busy calendars on your Bberry.   What's the best way for me to track these sorts of calendar appointments in Outlook so they'll be more useful to me on my Bberry?  I'm sure there are others of you out there who track meetings with different agency groups or something similar to what I encounter.   Maybe there's a better way for me to go about using my Outlook calendar that will work seamlessly with my Bberry calendar. 
    Thanks!  I'm hoping I don't have to reinvent the wheel. 

    Tips for beginners that I have taught in the past and from me:
    0 - The debugger is your friend. Learn to use it, before you lean any more Java. REALLY!!!
    1 - Do NOT use the GUI development tool in your IDE, Code it yourself.
    2 - Read the Java Tutorials.
    3 - Java arrays begin with index 0.
    4 - Do NOT confuse leaning Java with learning to program. They are 2 distinct things.
    The language is a tool, but knowing how to program is a skill that will apply to many different tools.
    5 - There are more languages than Java, keep in mind each, including Java, were created for different tasks.
    6 - Develop your own style.
    7 - You are never done learning. NEVER.
    8 - Don't be afraid to modify your style, when you see something elegant, adopt it, make it part of your style.
    9 - If you're not having fun, you're doing the wrong thing.
    10 - Math is a major part of programming: you can never have too many Math skills.
    11 - Embrace the Java philosophy... write once, run anywhere a JVM exists.
    12 - Dumb code is actually better: don't get overly involved in optimizing your code--write it clean--Java will do the rest.
    13 - Learn to use your profiler, for when you really need to see if you can optimize. The problem is usually not where you think.
    14 - No matter how good you are, someone is always better and faster--when you encounter them, learn from what they do and use the good parts.
    15 - 800 lines of buggy code is not as good as 50 lines of clean, well designed code.
    16 - Your teacher is not always right, but they give you the grades.
    17 - Your boss may be an idiot, but he had the good sense, or lapse there of, to offer you a job and you accepted. He's your boss now, act like it, and help him look good--you'll go farther with a lot less stress. Also remember you future boss may want to contact him for a reference.

  • What's the best XML for JAVA?

    Hi There,
    My big question is what should I use for develop a normal XML document, that can:
    - contain BASE64 strings
    - support UTF-8 add attributes, etc.
    I then want to pick this document and:
    - do it's parsing (walk trough)
    - apply a xsl to this document.
    I've made this in C using libxml2 for WIN32/HP-UX, and also in VB using msxml4, now I must make the same document in Java, I see a lot of alternatives but really don't know what to choose...
    In these languages I pick a structure that we support (similar to a tree) and serialize it to XML, send it as a string and then rebuild the initial structure with flaws. Each client can have a xsl file to show the information in the way he wants to.
    So, I ask your opinion what's the best for JAVA (a fast learning curve is preferable, but speed of processing is very, very important)?
    Thanks in advance for all the replies,
    Lu�s Pinho

    Have you looked at Apache's XML Beans?
    http://xml.apache.org/xmlbeans/

  • Best program for JAVA?

    Hello I am new to java who can tell me the best program for writing java for beginner?

    I looked at notepad before but I do not like it. It
    not have many features.At this point, don't worry about features. Use a simple editor until you can do the following comfortably:
    1) Compile (multiple source) programs from the command line.
    2) Understand and fix compiler errors that show up.
    3) Set the CLASSPATH and fix problems that arise when the JVM can't find the Classes it needs.
    4) Run your program using the 'java' command line
    5) Read and understand Stack Traces that occur when your program runs.
    6) Use the 'jar' utility to bundle your program
    Then, and only then worry about moving on to an Editor/IDE that provides rich development features. If you don't understand the fundamentals of compiling and running Java programs, an IDE will only serve as a crutch.

  • Best way for Java/C++/C# to share data in a cache?

    I have an order processing application which listens for Order objects to be inserted in a cache. If I want Java, C# and C++ apps to be able to submit orders to that cache, what's the best way to set up that Order object? Orders currently have many Enum member variables. What happens when a C# or C++ app needs to put an Order object in the cache? how would it set those java enums? Also, the java Enum classes have a lot of Java specific code in 'em for convenience. I imagine for cross platform simplicity it might have been best if the Order object were just an array of Strings or a Map of Strings to values but I have too much code depending on the Order object being how it is currently. Should I extract an Order Interface? What about the Enums? My java enums aren't simple {RED,GREEN,BLUE} type enums, they contain references to other Enums, etc. - see below...
    A portion of my Order class looks like:
    public class Order implements Cloneable, Comparable, java.io.Serializable {
      private static Logger logger = Logger.getLogger(Order.class);
      private boolean clearedFromOpenOrdersTable = false; 
      private boolean trading_opened = false;
      private static Random generator = new Random();
      private static int nextID = generator.nextInt(1000000); //just for testing
      private int quantity = 0;
      private int open = 0;
      private int executed = 0;
      private int last = 0;
      private int cancelPriority = 0;
      private Integer sendPriority = 0;
    //enums
      private OrderSide side = OrderSide.BUY;
      private OrderType orderType = OrderType.MARKET;
      private OrderTIF tif = OrderTIF.DAY;
      private OrderStatus orderStatus = OrderStatus.PENDING_NEW;
      private OrderExchange orderExchange = null;
      private OOType ooType = OOType.NOTOO;
      private OOLevel ooLevel = OOLevel.NONE;
      private Float limit = new Float(0);
      private Float stop = null;
      private float avgPx = 0.0f;
      private float lastPx = 0.0f;
      private String account = null;
      private String symbol = null;
      private long submitTimestamp;
      private long fillTime = 0;
      private long ackTime = 0;
      private Timestamp submitSqlTimestamp;
      public /*final*/ static NamedCache cache;
      private ArrayList<OrderStatusChangeListener> statusChangeListeners =
        new ArrayList<OrderStatusChangeListener>();
      transient private Format formatter = new SimpleDateFormat("hh:mm:ss a");
      public static void connectToCache() {
        cache = CacheFactory.getCache("orders");
      public void send() {
        this.submitTimestamp = System.currentTimeMillis() ;
        this.submitSqlTimestamp = new Timestamp(submitTimestamp);
        cache.put(this.ID, this);
      public void setCancelCount(int i) {
        cancelCount = i;
      public int getCancelCount() {
        return cancelCount;
      public static class CancelProcessor extends AbstractProcessor {
        public Object process(InvocableMap.Entry entry) {
          Order o = (Order)entry.getValue();
          if (o.cancelCount == 0) {
            o.cancelCount = 1;
          } else {
            logger.info("ignoring dup. cancel req on " + o.symbol + " id=" + o.ID);
          return o.cancelCount;
      public void cancel() {
          // cache.invoke(this.ID, new CancelProcessor() ); // must this be a 'new' one each time?
          Filter f = new EqualsFilter("getCancelCount", 0);
          UpdaterProcessor up = new UpdaterProcessor("setCancelCount",new Integer(1) );
          ConditionalProcessor cp = new ConditionalProcessor(f, up);
          cache.invoke(ID, cp);
      NumberIncrementor ni1 = new NumberIncrementor("CancelCount", 1, false);
      public void cancelAllowingMultipleCancelsOfThisOrder() {
        System.out.println("cancelAllowingMultipleCancelsOfThisOrder symbol=" + symbol + " id=" + ID);
        cache.invoke(this.getID(), ni1);
      public Timestamp getSubmitSqlTimestamp(){
        return submitSqlTimestamp;
      boolean isWorking( ) {
           // might need to write an extractor to get this from the cache atomically
           if (orderStatus != null &&
                (orderStatus == OrderStatus.NEW || orderStatus == OrderStatus.PARTIALLY_FILLED ||
                    // including PENDING_CANCEL breaks order totals from arcadirect
                    // because they send a pending cancel unlike foc
                    // os.getValue() == OrdStatus.PENDING_CANCEL ||
                    orderStatus == OrderStatus.PENDING_NEW ||
                    orderStatus == OrderStatus.PENDING_REPLACE)) {
              return true;
            } else {
              return false;
      public long getSubmitTimestamp(){
        return submitTimestamp;
      private void fireStatusChange( ) {
              for (OrderStatusChangeListener x:statusChangeListeners) {
                    try {
                         x.dispatchOrderStatusChange(this );
                    } catch (java.util.ConcurrentModificationException e) {
                         logger.error("** fireStatusChange: ConcurrentModificationException "+e.getMessage());
                         logger.error(e.getStackTrace());
                         e.printStackTrace();
      public Order() {
          ID = generateID();
          originalID = ID;
      public Object clone() {
          try {
            Order order = (Order)super.clone();
            order.setOriginalID(getID());
            order.setID(order.generateID());
            return order;
          } catch (CloneNotSupportedException e) {
          return null;
        class ReplaceProcessor extends AbstractProcessor {
          // this is executed on the node that owns the data,
          // no network access required
          public Object process(InvocableMap.Entry entry) {
            Order o = (Order)entry.getValue();
            int counter=0;
            float limit=0f;
            float stop=0f;
            int qty=o.quantity;
            boolean limitChanged=false, qtyChanged=false, stopChanged=false;
            for (Replace r:o.replaceList) {
              if (r.pending) {
                counter++;
                if (r.limit!=null) {limit=r.limit; limitChanged=true;}
                if (r.qty!=null) {qty=r.qty; qtyChanged=true;}
                if (r.stop!=null) {stop=r.stop; stopChanged=true;}
            if (limitChanged) o.limit=limit;
            if (qtyChanged) o.quantity=qty;
            if (stopChanged) o.stop=stop;
            if (limitChanged || qtyChanged || stopChanged)
            entry.setValue(o);
            return counter;
      public void applyPendingReplaces() {
         cache.invoke(this.ID, new ReplaceProcessor());
      private List <Replace>replaceList;
      public boolean isReplacePending() {
        if (replaceList==null) return false; 
        for (Replace r:replaceList) {
          if (r.pending==true) return true;
        return false;
      class ReplaceAddProcessor extends AbstractProcessor {
        // this is executed on the node that owns the data,
        // no network access required
        Replace r;
        public ReplaceAddProcessor(Replace r){
          this.r=r;
        public Object process(InvocableMap.Entry entry) {
          Order o = (Order)entry.getValue();
          if (o.replaceList==null) o.replaceList = new LinkedList();
          o.replaceList.add(r);
          return replaceList.size();
      public void replaceOrder(Replace r) {
          //  Order.cache.invoke(this.ID, new ReplaceAddProcessor(r));
          Order o = (Order)Order.cache.get(this.ID);
          if (o.replaceList==null) o.replaceList = new LinkedList();
          o.replaceList.add(r);
          Order.cache.put(this.ID, o);
      public boolean isCancelRequestedOrIsCanceled() {
        // change to cancelrequested lock, not ack lock
        if (canceled) return true;
    //  ValueExtractor extractor = new ReflectionExtractor("getCancelCount");
    //  int cc = (Integer)cache.invoke( this.ID , extractor );
        Order o = (Order)cache.get(this.ID);
        int cc = o.getCancelCount();
        return cc > 0 || o.isCanceled();
        class Replace implements Serializable{
        boolean pending=true;
        public Float limit=null;
        public Float stop=null;
        public Integer qty=null;
        public Replace() {
      }and then a portion of my OrderExchange.java Enum looks like this:
    class SymbolPair implements java.io.Serializable {
      String symbol;
      String suffix;
      SymbolPair(String symbol, String suffix) {
        this.symbol = symbol;
        this.suffix = suffix;
      public boolean equals(Object o) {
        SymbolPair x = (SymbolPair)o;
        return (this.symbol == x.symbol && this.suffix == x.suffix);
      public int hashCode() {
        return (symbol + "." + suffix).hashCode();
      public String toString() {
        if (suffix == null)
          return symbol;
        return symbol + "." + suffix;
    public enum OrderExchange implements java.io.Serializable {
      SIM("S", false, '.', OrderTIF.DAY) {
        public String getStandardizedStockSymbol(String symbol, String suffix) {
          return symbol + "." + suffix;
        public SymbolPair getExchangeSpecificStockSymbol(String symbol) {
          return new SymbolPair(symbol, null);
      TSX("c", false, '.', OrderTIF.DAY) {
        public String getStandardizedStockSymbol(String symbol, String suffix) {
          String x = externalSymbolPairToInternalSymbolMap_GS.get(new SymbolPair(symbol, suffix));
          return x == null ? symbol : x;
        public SymbolPair getExchangeSpecificStockSymbol(String symbol) {
          SymbolPair sa = internalSymbolToExternalSymbolPairMap_GS.get(symbol);
          return sa == null ? new SymbolPair(symbol, null) : sa;
      NYSE("N", false, '.', OrderTIF.DAY) {
        public String getStandardizedStockSymbol(String symbol, String suffix) {
          String x = externalSymbolPairToInternalSymbolMap_GS.get(new SymbolPair(symbol, suffix));
          return x == null ? symbol : x;
        public SymbolPair getExchangeSpecificStockSymbol(String symbol) {
          SymbolPair sa = internalSymbolToExternalSymbolPairMap_GS.get(symbol);
          return sa == null ? new SymbolPair(symbol, null) : sa;
      ARCA("C", false, '.', OrderTIF.GTD) {
        public String getStandardizedStockSymbol(String symbol, String suffix) {
          String x = externalSymbolPairToInternalSymbolMap_GS.get(new SymbolPair(symbol, suffix));
          return x == null ? symbol : x;
        public SymbolPair getExchangeSpecificStockSymbol(String symbol) {
          SymbolPair sa = internalSymbolToExternalSymbolPairMap_GS.get(symbol);
          return sa == null ? new SymbolPair(symbol, null) : sa;
      public abstract String getStandardizedStockSymbol(String symbol, String suffix);
      public abstract SymbolPair getExchangeSpecificStockSymbol(String symbol);
      private static Map<SymbolPair, String> externalSymbolPairToInternalSymbolMap_GS = new HashMap<SymbolPair, String>();
      private static Map<SymbolPair, String> externalSymbolPairToInternalSymbolMap_ARCA = new HashMap<SymbolPair, String>();
      private static Map<String, SymbolPair> internalSymbolToExternalSymbolPairMap_GS = new HashMap<String, SymbolPair>();
      private static Map<String, SymbolPair> internalSymbolToExternalSymbolPairMap_ARCA = new HashMap<String, SymbolPair>();
      private static Object[] toArrayOutputArray = null;
      static {
        String SQL = null;
        try {
          Connection c = MySQL.connectToMySQL("xxx", "xxx", "xxx", "xxx");
          SQL = "SELECT symbol, ARCASYMBOL, INETSYMBOL, ARCASYMBOLSUFFIX, INETSYMBOLSUFFIX from oms.tblsymbolnew";
          Statement stmt = c.createStatement();
          ResultSet rs = stmt.executeQuery(SQL);
          while (rs.next()) {
            String symbol = rs.getString("symbol");
            if (rs.getString("ARCASYMBOL") != null) {
              if (!symbol.equals(rs.getString("ARCASYMBOL")) || rs.getString("ARCASYMBOLSUFFIX") != null) {
                String suffix = rs.getString("ARCASYMBOLSUFFIX");
                SymbolPair sp = new SymbolPair(rs.getString("ARCASYMBOL"), suffix);
                internalSymbolToExternalSymbolPairMap_ARCA.put(symbol, sp);
                externalSymbolPairToInternalSymbolMap_ARCA.put(sp, symbol);
        } catch (Exception e) {
          System.out.println(SQL);
          e.printStackTrace();
          System.exit(0);
      static {
        populateSymbolToDestination();
      static Logger logger = Logger.getLogger(OrderExchange.class);
      private static HashMap<String, OrderExchange> symbolToDestination = new HashMap<String, OrderExchange>();
      private final String tag100;
      private final boolean usesSymbolSuffixTag;
      private final char symbolSuffixSeparator;
      private final OrderTIF defaultTif;
      private static final String soh = new String(new char[] { '\u0001' });
      private OrderExchange(String tag100, boolean usesSymbolSuffixTag, char symbolSuffixSeparator, OrderTIF defaultTif) {
        this.tag100 = tag100;
        this.defaultTif = defaultTif;
        this.usesSymbolSuffixTag = usesSymbolSuffixTag;
        this.symbolSuffixSeparator = symbolSuffixSeparator;
      public OrderTIF getDefaultTif() {
        return defaultTif;
      public String getTag100() {
        return tag100;
      public char getSymbolSuffixSeparator() {
        return symbolSuffixSeparator;
      public static OrderExchange getOrderExchangeByExchangeName(String name) {
        for (OrderExchange d : OrderExchange.values()) {
          if (d.toString().equalsIgnoreCase(name.trim())) {
            return d;
        return null;
      Thanks,
    Andrew

    Hi Andrew
    The only way to serialize object, so that they can be used by other languages than Java is to use the Portable Object Format.
    The implementation of this requires you to implement the PortableObject interface in Java. PortableObject defines two methods
    public void readExternal(PofReader reader);
    public void writeExternal(PofWriter writer);
    Also you need to add a POF config file that ties the type to a type id.
    In C++ each type needs two template methods implemented to seralize and deserialize. But first it needs to register the data type with the same type id as for the Java type using the COH_REGISTER_MANAGED_CLASS macro.
    Secondly analogs to Java implement the serializer stubs
    template<> void serialize<Type>(PofWriter::Handle hOut, const Type& type);
    template<> Type deserialize<Type>(PofReader::Handle hIn);
    For C# your serializable types need to implement IPortableObject, with it's two methods:
    void IPortableObject.ReadExternal(IPofReader reader);
    void IPortableObject.WriteExternal(IPofWriter writer);
    Similar to Java C# uses a POF configuration file, the same type id should bind to the corresponding C# type.
    For more information see
    POF Configuation: http://coherence.oracle.com/display/COH34UG/POF+User+Type+Configuration+Elements
    C++: http://coherence.oracle.com/display/COH34UG/Integrating+user+data+types
    C#: http://wiki.tangosol.com/display/COHNET33/Configuration+and+Usage#ConfigurationandUsage-PofContext
    Hope that helps!
    /Charlie
    Edited by: Charlie Helin on Apr 30, 2009 12:31 PM

  • Video Tutorials for java beginners

    Hi there! My name is Donato and I'm developing some video tutorials addressed to those people who would like to learn a bit of Java but don't feel like reading endless books.
    They will cover easy topics and will show everything step by step.
    I'd like to know if someone is interested in supporting and helping me. Here's an example of the first of this flash tutorials:
    http://scorpio2002.altervista.org/Java/java_1.zip
    What do you think?
    Ciao,
    Donato
    Italy

    you learn to do it by writing code.I don't remember having stated that you learn a
    language in a way other than writing code.
    I said in the video that the only way to learn a
    programming language is to write a lot of code...
    You don't learn to program by watching videos; At this rate, one could say "You don't learn to
    program by reading books" :-)
    A video is just a different way of getting started.
    Some people are just scared by programming and need a
    soft way to get involved.
    Serious people will be reading those endlessbooks
    After you got involved, you'll get thousands of books
    and you'll go into the "guts" of the language.
    Personally I like books... but I don't see why - if
    you get started with some videos and then, if you're
    still interested, you pass to books - you're not
    serious. Can you just explain me what the difference
    is?
    The "endless" books are usually about advancedtopics, not the introductory stuff that a video
    covers.
    You're right. :D And I don't remember saying
    something different.
    Sorry, I don't think it's a great idea.I thank you anyway. I posted this topic just to see
    if there was someone interested. :-)
    And these videos are not meant for experienced
    developers like you. This video are to be made BY
    experienced developers like you... :D Maybe there has
    been a missunderstanding, sorry, but my English is
    not that well... :(So what do you care what we think? Make them, market them, and let the marketplace decide how good your idea is. If they sell, you're right. Your balance sheet will be the best scorecard there is.
    %

  • Best way for Java objects to relate to DB tables

    When creating a Java app which relies on a backend DB, it is convenient (and necessary) to create Java classes which relate to the data in those tables. However with a normalised set of tables, should the Java classes relate purely to the tables, or the "view" of the un-normalised data?
    e.g. (rough example of what I mean)
    CREATE TABLE teams
    team_id INTEGER NOT NULL PRIMARY KEY,
    team_name CHAR(50)
    CREATE TABLE users
    user_id INTEGER NOT NULL PRIMARY KEY,
    user_name CHAR(50),
    team_id INTEGER REFERENCES teams(team_id)
    Now, the Java class for a user could have either have a variable (e.g. teamName) declared as an int (to fully reflect the table design) or a String (to represent the "view" of the data). I know that views can be used etc. and in this example that would be very easy � I am just using these simplified tables as an example.
    I have tried both and both have pitfalls. For instance, when getting the data from the database, it is very easy to create the object from the DB if it reflects the �view� of the data. However when it comes to updating the data in the DB, you need to do a lot of other work to find out what needs updating in which tables, because the actual raw data (as will be inserted/updated with SQL commands) is not available in the Java object.
    I hope this makes sense.
    Thanks.

    My question is what is the best way to write the classes that represent the DB data. As I said this is not EJB (that would handle the DB side of things anyway), as this is overkill for this particular situation. It was more of a general question anyway - should the class contain the actual data (e.g. should the user Class contain a String for the team name (e.g. Purchasing) or a link to the underlying DB id for Purchasing.
    In reality, I would create a Team class, but the same applies - should the Java Class ever contain any relationship to the underlying DB. I think not, but it seems inefficient to have to continually query the DB to find out information we already have.
    Apologies if I am not explaining this very well.

  • Best practice for Java stand alone upgrade into maint org area?

    I have a Java standalone running EP 6.0 on SAP netweaver 04 at SP 20.
    I want to upgrade to SAP Netweaver 2004s.  I think the equivalent of SPS 20 of NW 04 in NW 2004s is SPS 11 (ie all the SCAs are named *11...).
    NW 2004s SPS 11 download requires use of maintenance_organizer.
    Does this mean I should change the SMSY definition of my java solution to reflect SAP Netweaver 2004s now, rather than after I actually upgrade, even though the upgrade may be several weeks away?
    Is changing the SMSY def the only way to get the SPS 11 media? 
    I am currently in the process of collecting all of the media required for a sucessful upgrade.
    Thx
    Ken Chamberlain
    University of Toronto

    kevjava wrote: Some things that I think would be useful:
    Suggestions reordered to suit my reply..
    kevjava wrote: 2. Line numbering, and/or a line counter so you can see how much scrolling you're going to be imposing on the forum readers.
    Good idea, and since the line count is only a handful of lines of code to implement, I took that option. See the [line count|http://pscode.org/stbc/help.html#linecount] section of the (new) [STBC Help|http://pscode.org/stbc/help.html] page for more details. (Insert plaintiff whining about the arbitrary limits set - here).
    I considered adding line length checking, but the [Text Width Checker|http://pscode.org/twc/] ('sold separately') already has that covered, and I would prefer to keep this tool more specific to compilation, which leads me to..
    kevjava wrote: 1. A button to run the code, to see that it demonstrates the problem that you wish for the forum to solve...
    Interesting idea, but I think that is better suited to a more full blown (but still relatively simple) GUId compiler. I am not fully decided that running a class is unsuited to STBC, but I am more likely to implement a clickable list of compilation errors, than a 'run' button.
    On the other hand I am thinking the clickable error list is also better suited to an altogether more abled compiler, so don't hold your breath to see either in the STBC.
    You might note I have not bothered to update the screenshots to show the line count label. That is because I am still considering error lists and running code, and open to further suggestion (not because I am just slack!). If the screenshots update to include the line count but nothing else, take that as a sign. ;-)
    Thanks for your ideas. The line count alone is worth a few Dukes.

  • The No.1 Best Tip For Anyone Installing Leopard

    Reading through all the 'posts of woe' and nashing of teeth and ******** and, well you get the picture, one thing is coming to the front as the No.1 best thing to do before installing Leopard........BACK UP YOUR COMPUTER...down load superduper (for free) and do an 'all files' back up, then make sure you can boot off that external HDD and then attempt the install. Actually for good measure get another HDD and manually back up all your data, files and media so at least you have another back up just in case. Also have your tiger discs at hand in case of a massive meltdown.
    Most folks seem to be ****** off here because they have lost everything on their computer, and that would be okay if it wasn't for the fact that apple clearly states that back ups should be made. The truth is we have been spoilt with OS that never crashes and is so easy to upgrade, that when something like this comes along we panic. Without getting into the whole "was it ready to be released" debate, the fact is its here and any problems that occur in the early days will be swiftly eliminated by the folks at apple
    This is the coal face here folks, its dirty and you should be prepared to get a little beaten up! I reckon we'll be getting software updates every day or so for a while
    I still haven't been able to install leopard and I'm a little peeved, but I'll sort it out, and in the meantime I'll thank my lucky stars I don't have a PC and that tiger is still working.
    Keep the fate brothers and sisters

    It will be interesting to see how this all sorts out. I did back up. However, I installed as an upgrade on 4 different computers. Mac Pro 2.66 intel, Mac Book Pro Intel, IMac 24" cor2duo extreme, and an IMac corduo 20". All installs went without a problem. I do hope Apple looks at this and tries to figure out why there is so much variation from one to another when the machines seem to be the same in many cases. I think that perhaps as do many other programs that Apple puts out, there is an "Apple is checking your computer for compatibility"screen before the install begins. That way any program that might be a problem could be addressed before install. Also some useful information as to the install process itself might be helpful in the package as well. I.E. that the blue screen might hang for a significant time as it checks the hard drive might reduce some of the anxiety many of us feel when it appears that things have hung when perhaps they have not. In any case I suspect things will shake out soon enough. I think Apple has to learn that there are many new customers old and young that need a little more help than just put the disc into your computer and let it go. Just my feelings on the matter since I was fortunate to have no problems.

  • Standards or best practises for Java imports?

    I was just wondering how some of the more seasoned developers out there handle Java imports. I'm fairly new to Java programming and as far as I know there is very little difference between explicitly importing individual classes and importing entire packages, other than at compilation time on large projects, however I'm wondering if there is an official standard or if you have any personal preferences for it.
    Personally I always used to import packages unless I was only using one class from the package, however I have a friend who swears by importing individual classes for everything you use unless you are using almost every class in the package. I'm thinking that a happy medium might be to put a level of inclusion on your work, say if you use less than 50% of classes you should import them individually, but if you use more than 50% you should import the entire package.
    I realise that it doesn't make a great deal of difference to the overall outcome of a project, I'm just looking for your opinions and experiences with it.

    If you're working on a large codebase with a team, then it is helpful to use explicit imports, so that others can readily see which package particular classes come from.
    Also consider the case where there two classes from different packages share a name. In this case you must use at least one explicit import.
    But what if this situation doesn't exist (yet). You import two packages using wildcards. And then later someone comes along and creates a class in the second package with a name used by a class in the first package. Suddenly the class with the wildcard imports won't compile. Perhaps this is a contrived example.
    Regarding personal practice, I usually use explicit imports for the first reason listed above. But secondly, I like to do so because it forces me to remember the package to which the class belongs. Most programmers type pretty quickly, so it's not much of a burden.
    By the way, the compile-time cost, if it is even measurable, is no factor whatsoever. Writing readable and maintainable code is much more important.

  • What is the best tips for privacy and security

    How can you secure your email and phone messages

    And don't forget the passcode or you will be erasing the phone if you forget it. Use a complex passcode rather than the simple four digit PIN. These can be cracked in no time should you lose your phone.

Maybe you are looking for