Win a copy of Event Streams in Action this week in the Java in General forum!

Ken Duncan

Ranch Hand
+ Follow
since Apr 30, 2007
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ken Duncan

HI Ken

  Great name! What do you think is the most common coding challenge that Java developers struggle to work out? What recipe do you have for this? Thanks.


Ken
1 year ago
Hello Pierre-Yves Saumont,

  I would like to ask you two questions please.
1. Your table of contents lists recursion. I have had to maintain code in 370/Assembler that used recursion heavily. When there was a problem it was nearly impossible to figure out from which point the recursive code was called and therefore nearly impossible to follow the path of the code. Does recursion in functional programming in Java have any constraints to prevent that sort of situation? The functional code samples I've seen look very complicated and using them for recursion colde make for code that even if I wrote it I would not want to own it.

2. I have taught Java a lot and I always started out with describing Java as an object-oriented language and explaining what that means. Functional programming is decidedly not object-oriented, and therefore breaks the essential paradigm of the language, making it more like C++, a functional language plus objects. Doesn't this make Java lose the benefit of being a truly OO language as opposed to C++ or C# or something like that? If I taught a course on Java and got to the functional programming stuff, I'd have to tell students , "I know I said Java is OO, but with Java 8, you can forget that." What is your view?

Ken
Welcome to the three of you. Congratulations on a book that sold well enough to have a second edition. I'd like to ask you a conceptual question about the book. I'm familiar somewhat with JavaScript, but certainly not a ninja.  I looked at the table of contents of the new edition and certainly some of those things I don't know. Other than saying, "Master the entire book," what would a JavaScript ninja know that other users of JavaScript probably don't? Put another way, if you needed smoe JavaScript written, when wuld a non=ninja JavaScript developer be sufficient and when would a ninja be needed? Thanks.

Ken
Hi Victor,

I have a couple of questions about your book. It sorts of sounds like coming at UX design by a different path? Is that an accurate statement based upon my looking at the table of contents? Also, I'm particularly concerned about web sites that are not very accessible. Except for Gmail, which I have to use, if I see a site does not support accessibility, e.g., if you make the font bigger, the text breaks, I'm out of there. Does accessibility fit into your approach? Thanks.

Ken
3 years ago

Campbell Ritchie wrote:But the idea was to show a λ in use.

I think this thread might well be duplicated in the Java8 forum.



Yes, it does that. I am clearly not as comfortable with Java 8 features as many. However, my objection is not about what code you write to accomplish a task. For my own part, simple, easy-to-understand code is superior to complex/cryptic syntax, but I digress.

However, my essential point initially was that Java is supposed to be object-oriented. As far as I can see, lambda expressions don't belong to any class. They are indeed more like a C function embedded in Java code. I think the object-oriented paradigm is a good one. Lambdas are not OO. They are not a member of a clss I defined. They are not methods of a class I defined. At least anonymous inner classes, though inelegant, are classes. It is not far from creating a Singleton, Final Static class, Final Static method. However, that, at least, is a class from which an object is instantiated (I think). Do lambda expressions cause an object to be instantiated?My objection is primarily, though not exclusively, conceptual, not syntactical. I will be interested to see what this looks like in a stack trace because it does not belong to anything I instantiate, if I understand lambdas correctly. I will learn them because they are now part of Java, but I don't think they should be.
3 years ago
I have only written XML via Java code once, and with only seven elements that always had values, it was easy. Now I need to create an XML file for one of our vendors that must have 39 elements and sub-elements, with some of he data being blank. I have the data in a tab-delimited .txt file mostly. Is there any tool that will help me turn the tabbed fields into the appropriate XML without spending more time to set it up than brute force code to read each row of 39 tabbed item and wrap them in XML? Thanks.

Duncan
Greetings Cay,

I know that Lambda expressions are a big deal in Java 8, but I'm interesting in knowing why you think this is s "Core" Java item and not an advanced topic for the second volume? It might just be me but I don't even think that Lambda expressions are object-oriented and don't belong in the language at all, but I digress. Please don't take that as a criticism. It's not about you or the book. On the contrary, I began learning about Java in the very first edition of this book, and learned things I found nowhere else. So I am looking forward to working through it. Thanks.

Duncan
3 years ago
Hi Jeanne and Scott,

After looking at the exam topics, there are a lot of topics that I'm not very familiar with, besides the Lambda material. Do you advise studying for and taking exams on previous versions of Java to get ready to be able to prep properly for the Java 8 exam, or does your book assume that readers don't know much about Java? Thanks.

Duncan
HI Marco,

While your new book covers multiple ways for Java to access databases, I'm interested in your own thoughts about DB access with plain JDBC vs. Spring vs. Hibernate vs. JPA vs.??? Which approach do you prefer in your own work, and why? I'm partial to using plain JDBC for debugging purposes, even though it can take a lot more code. Thanks.

Ken
Herb,

The very beginning of your book presents JavaFX as though ti builds upon AWT and Swing. What I have seen of JavaFX, it is far more complicated than Swing. When is javaFX the right tool to use, given what appears to me to be a very large learning curve past Swing to become any good at it? Thanks.

Duncan
3 years ago

This might sound like an odd question, or date me, or something but here goes. I'm about to move, and I've got way too many Java books on design (e.g., Peter Coad's), APIs (e.g., JSTL), and coding. Only one of them, on JEE is more recent than 2010 (I've been programming mainly outside the Java world for several years, but before that, I did a lot with Java and it is still my language of choice). Should I automatically assume that pretty much anything Java from before then is obsolete now? I likewise have books on the development process, but I don';t ever see discussions of those approaches these days. Everything is Agile--even if it isn't. I have, for example, the first edition of the J2EE Design Patterns book. Is this all waste paper? Well, I'm sure the classic book Design Patterns isn't, but it's not language-specific.

If and when I've dumped my old UML, Java API, Java design, etc., books, I'd be interested in recommendations for
JEE APIs and development
Java 8 programming
Java design
Common approaches to Java application development now.

I've been out of the loop, so to speak, a while, but I want to jump back in. Thanks.

Ken



4 years ago

Stefan Evans wrote:Any more info? Does it say which class is not found? Stack trace?

What fails? The actual installation?
Running/Compiling stuff after installation?

Sounds weird to me.
Maybe uninstall java completely, and then install into a 'fresh' environment?



The exception occurs during the installation problem. I never get to compile anything. I also do not see a Stack trace. I am attaching a screen shot of the error that I received. This is pretty minimal, but I'm not sure where I would find more info. Thanks.

Ken
4 years ago
I've been installing and using Java since all there was was Java 1.02. I've installed several versions, most recently Java 7. I have tried to install Java SE 8u25 on a 64-bit Windows 7 system. This fails with a ClassNotFound exception. I've never seen that in any prior Java version. I have found mostly people saying, "Me too," rather than anyone proposing a solution that worked. Any suggestions? Thanks.

Ken
4 years ago
Hi Jeff,

What is the biggest difference between normal Java (web) development and Java development for Android? Thanks.

Ken
4 years ago

Hi Jeff,

I have never done Android development. I cannot tell from looking at what Amazon says about book how someone like me, without an Android phone to work with directly, does your book point to any way to test the code without having to update an actual Android phone? Thanks.

Ken


4 years ago