Re: Of Java and C#





On Jan 28, 1:21 am, LX-i <lxi0...@xxxxxxxxxxxx> wrote:
Pete Dashwood wrote:
Hi Daniel,

not sure if this is the Rogers Cadenhead book I recommended or not.. I
thought it was Java 2 in 24 hours... Whether it is or not, very pleased to
see you have found something that was of use and shared it with the group.Heh - well, he did both. The "Java 2 in 24 Hours" (according to Rogers)
is for people who come from a blank slate as far as software development
goes, while the book I named is geared more towards folks who already
know programming to some extent. (That's what he said in Appendix A.)
It does seem to move at a pretty good clip, though - there have been
sections I've had to go back and read again, the do the example program,
then go back and read it yet again. However, that technique usually
makes the point apparent. :)

Here are the topics, by day, with the appendices...
Week 1 - The Java Language
- Day 1 - Getting Started with Java
- Day 2 - The ABCs of Programming
- Day 3 - Working with Objects
- Day 4 - Lists, Logic, and Loops
- Day 5 - Creating Classes and Methods
- Day 6 - Packages, Interfaces, and Other Class Features
- Day 7 - Threads, Exceptions, and Assertions
Week 2 - The Java Class Library
- Day 8 - Data Structures
- Day 9 - Working with Swing
- Day 10 - Building a Swing Interface
- Day 11 - Arranging Components on a User Interface
- Day 12 - Responding to User Input
- Day 13 - Using Color, Fonts, and Graphics
- Day 14 - Writing Java Applets and Java Web Start Applications
Week 3 - Java Programming
- Day 15 - Working with Input and Output
- Day 16 - Serializing and Examining Objects
- Day 17 - Communicating Across the Internet
- Day 18 - JavaSound
- Day 19 - Creating and Using JavaBeans
- Day 20 - Reading and Writing Data Using JDBC and XML
- Day 21 - Writing Java Servlets and Java Server Pages
Appendices
A - Choosing Java
B - Using the Java Development Kit
C - Programming with the Java Development Kit
D - Using the NetBeans Integrated Development Environment
E - Writing Java 1.1 Applets
F - Creating Web Services with XML-RPC
G - Regular Expressions
H - Where to Go From Here: Java Resources
I - The Book's Website

The latter ishttp://www.java21days.com- click on the "Fourth Edition"
link. The example classes and Java source files are there, if you want
to see the code he uses to teach these.

(BTW, threads are really, REALLY cool!)

Didn't realise you were getting into C#.Well, I hadn't planned on it. At one point, I was responsible for our
home-brewed CM system, and am now the alternate programmer for it. The
lead guy is working on a .NET conversion, partly to get around the
limitations of the current ActiveX controls we currently use.

When programmers check in a source code file, there are several checks
we do to it, and cross-references that should be updated. The new .NET
check-in page was deployed last month, and has been the most troublesome
page in the system ever since. Within the system itself, there is the
capability to create a control number against the system, and there have
been a couple of formal bug reports.

Monday this past week was day 3, "Working with Objects". This was also
the day that I took it upon myself to begin writing the design for the
changes we would do to fix these problems. It came to me - a lot of
these processes need to do a line-by-line analysis of the code. Why not
write one object to do it all?

From an OO PoV ...that would be a major bad idea..

In OO we have a design principle called 'Single Responsibility
Principle'.

This is where every class has One and Only One responsibility.

A simple example of a Java Code Analyist....

In the case of code line by line code analysis, there are a number of
distinct Responsibilities:

1) Code File Parser - Whose Responsibility it is to Read the file
and decide which other classes should be used to handle the different
parts.

1...n) Code Analyser Classes - A different one Responsible for each
distinct Code target you want to analyse.

1...n) Analyst Reporter Classes - These would be Responsible for
sending the reports to stand out, email, log files, etc,


class JavaFileParser {
}


class JavaCommentAnalyst {
}

class JavaClassHeaderCommentAnalyst extends JavaCommentAnalyst {
}

class JavaMethodCommentsAnalyst extends JavaCommentsAnalyst {
}


interface CodeAnalystReporter{
void send(String report);
}

class EmailingCodeAnalystReporter implements CodeAnalystReporter {
}

class LoggingCodeAnalystReporter implements CodeAnalystReporter {
}

I suspect this example isn't what your class does, but we can go
through it when you post it....

HTH

Andrew

.



Relevant Pages

  • Re: [OT] Of Java and C#
    ... I thought it was Java 2 in 24 hours... ... is for people who come from a blank slate as far as software development goes, while the book I named is geared more towards folks who already know programming to some extent. ... Day 14 - Writing Java Applets and Java Web Start Applications ... C - Programming with the Java Development Kit ...
    (comp.lang.cobol)
  • Re: Current JSON Proposal in ES4
    ... In all completely object-oriented languages, like JavaScript, isn't it ... toJSONString further complicates Objects with more responsibility. ... Is "unit" a new keyword for ES4? ... We are really headed towards Java, ...
    (comp.lang.javascript)
  • Re: UID generation, was Re: Import Scan Images to DICOM as Open Source Application
    ... Mathieu Malaterre wrote: ... not allowed as the UID root is required to find the responsible person / ... responsibility when porting to java... ... Well GDCM is also available from Java. ...
    (comp.protocols.dicom)
  • Re: on buffer overflows and insecurity (was returning error from main())
    ... On 22 Sep 2007 at 21:23, jacob navia wrote: ... Why don't you just go away and program in Java if you don't like the ... freedom (and responsibility) that C gives to programmers? ...
    (comp.lang.c)
  • setting up classroom lab
    ... I have inherited the responsibility of setting up a college lab for java ... Students telnet into the Redhat server and use PICO to create their scripts. ...
    (comp.lang.java.help)