SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-22-2010, 07:37 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Any experience in Sun online classes?

I have a want to learn more of java than I have taught myself and learned from all you guys. I am strictly wanting to learn as a hobby and thirst for knowledge Just wondered if any of you had any experience with the sun online courses that are available and if they are good? They are pretty expensive classes but not anymore expensive than any of my other hobbies
Reply With Quote
  #2  
Old 01-22-2010, 10:04 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,546
Plucky, I think the java certification courses are really aimed to be a resume booster (much like MS certification cources, etc). While they will teach you some things, their free online tutorials are probably a better learning model.

This isn't what you asked for, but... there are some core things to remember when writing code (in my own personal oppinion)...
1. Try not to re-invent the wheel (if possible), so rely on commonly used libraries where possible. For example, every java developer gets tired of writing
Code:
if (string!=null && string.trim().length()>0) {
   // do some work on non empty string...
}
so, we end up writing a StringUtil class with an isEmpty(string) method, etc. It doesn't take a long time, but over time, you end up with a lot of "Util" function that other people have probably written as well. So, when you are writing code, consider looking at the Apache Commons project to see if there is a library that will help. For example they have the commons-lang (includes StringUtil, EscapeUtil, NumberUtil, etc), they have commons-io (stream copying, file utils, etc). Sometimes just using one of these libraries can save hours of programming effort. Bottom line, where possible, try not to re-invent code, especially re-usable utility type functions, because they probably already exist.

2. Understand objects and OOP. Java forces your to write everything as a "class", but many people don't start out thinking about "classes" and "objects". So, when you embark on a project, sketch out the ideas on paper, and make a note of the types of "things" that you'll be dealing with. Doing this will help you break your code into more meaninful classes.

3. Break up your code into re-usable chunks. As a metric, a class method should only ever be a few lines long. If you have very large methods, then you can probably look at breaking up that method into several methods. if you find that your are "copying and pasting" code sections, then that's a clear sign that you need to create a method. Breaking up your code into smaller chunks will make it easier to debug and maintain. it will also help you better unit test your code.

4. Use an IDE. I "grew up" in the era where "real men used vi and programmed only in c", and I spent a large part of my programming life in that mindset But, IDEs, provide some core functions to entry level developers... Code Completion / Help, Code Generation, Refactoring tools, and debuging tools. IDEs may make you lazy... but they'll probably also make your code much better, especially if you use the features of the IDE and don't treat it like a glorified text editor

5. Model your code. I tend to model my code using interfaces. Interfaces are great a modelling, since it does 2 things... 1. it allows you to write code (which feels productive), and 2. It enables you to quickly see, without spending too much effort, how your code will be consumed. Most people hate interfaces, because you have "implement" them at some point, so it seems redundant. But, if you are using an IDE, then implementing an interface is usually just an extra "click" when you create the implemenation class. ie, in eclipse, when i tell it to implement an interface, it will create the stubbed out methods for you, so it doesn't really take that much time time to model using interfaces.

6. Google "Design Patterns". Design patterns will help you write better code, if you understand the patterns Programming is more about design patterns than about the tools/language being used. ie, i've written in c/c++, php, java, c#, (and the list goes on...), but learning a new language is simply learning the "syntax" of the language. Actually doing something useful with a language involves algorithms and design patterns. There's obviously more to it than that, but if you understand and use design patterns, then you'll probably become quite proficient at writing good code (in any language that you choose to learn)

Keep in mind, these are my personal thoughts. I think that if you really want to know more about programming in java, you should look at more of the online tutuorials, and especially look at the apache commons libraries for your projects. If you hadn't looked at java at all... then i'd consider taking a community college night course.. but given that you've actually build java classes, you've probably are already further ahead of what you'll learn in night classes.

Good luck.
Reply With Quote
  #3  
Old 01-22-2010, 10:30 AM
jreichen's Avatar
jreichen jreichen is offline
Sage Icon
 
Join Date: Jul 2004
Posts: 1,192
I haven't taken any of Sun's online courses. Most of my learning has been on-the-job (Google searches and smart people sitting around me), from reading books, and a few instructor-led courses at work. Here are a few ideas in addition to Sun's courses:
  • Sun's Online Java Tutorial. A great place to start if you haven't already.
  • Books from the "Head First", "Effective", and "Core" series. These are the ones I see and hear mentioned most often.
  • The Java Certification Study Guide book sounds dry because of the name but it covers a lot of fundamentals and gotchas you might not get elsewhere. (I read the 1.4 version).
  • I used Deitel and Deitel's C++ book in college and found it very helpful. They now have a few Java books. Their books are expensive but very good.
  • "Tips" sites, like the one that had the example I sent you about extending Java's Properties object to sort the keys.
  • See if there's a local Java User's Group, an Open Source User's Group, or a meetup in your area.
Hope that helps
__________________
Server: Intel Core i5 760 Quad, Gigabyte GA-H57M-USB3, 4GB RAM, Gigabyte GeForce 210, 120GB SSD (OS), 1TB SATA, HD HomeRun.
Extender: STP-HD300, Harmony 550 Remote,
Netgear MCA1001 Ethernet over Coax.
SageTV: SageTV Server 7.1.8 on Ubuntu Linux 11.04, SageTV Placeshifter for Mac 6.6.2, SageTV Client 7.0.15 for Windows, Linux Placeshifter 7.1.8 on Server and Client
, Java 1.6.
Plugins: Jetty, Nielm's Web Server, Mobile Web Interface.

Reply With Quote
  #4  
Old 01-22-2010, 11:06 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Sean and jreichen,

Thanks for the advice. I do have some good understanding of coding as I use to do it 15 years ago in c++ but remembering it has become difficult at times . I understand the Sun courses are more about getting certified (took the first 3 of the msce courses about 10 years ago), but It wouldn't hurt "Adding to the resume" I am like a sponge and feel I can never learn anything enough. I like your path Sean it is a good one and some of it I get some of it I had to google I do use an IDE I currently use Netbeans and love it. I guess my biggest problem is I really feel/know I am only scratching the surface of what I could know/do about coding in general. Unfortunately there are no night classes here except for ones at local "tech" schools done that crap before and students always seem to know more than the instructor and it frustrates me to no end. I have read allot of the online tutorials and resources and understand some of it and then other parts I get lost.

Thanks for the advice here and at other times guys really appreciate it.
Reply With Quote
  #5  
Old 01-22-2010, 12:24 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,546
btw... i just googled for "free java pdf books" and come up with quite a few hits. Here's one site that includes some online books for java programming.
Reply With Quote
  #6  
Old 03-23-2010, 03:20 AM
doc doc is offline
Sage Fanatic
 
Join Date: Jun 2006
Location: Leicester, England
Posts: 915
I've spent the day reading online courses and start to switch off half way down the first page when they start talking about Abstraction, Encapsulation, Inheritance, Polymorphism..... its all a bit heavy when you haven't even got to the Hello World application...

It's gona be a long few weeks/months.......
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple monitors: anything new under the sun? elaw Hardware Support 4 05-03-2007 07:03 AM
Calling custom java classes from studio davin SageTV Studio 9 11-09-2005 11:50 AM
Sun JAVA 1.5.0 vs. 1.4.09 RAlfieri SageTV Beta Test Software 8 10-13-2005 12:39 PM
Hmm ... Kodak vs. Sun over Java mightyt General Discussion 1 10-06-2004 10:15 AM


All times are GMT -6. The time now is 02:51 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.