Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Who are the "expert programmers"?  RSS feed

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The book description starts with "Improve your coding skills by comparing your code to that of expert programmers so you can write code that’s clean, concise, and to the point: code that others will read with pleasure and reuse."

Who are these "expert programmers"? Are these the book authors, or are there other guests / Java experts?
 
author
Ranch Foreman
Posts: 8
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Geff,
expert programmers come in different shades. Since Java by Comparison is primarily aimed for intermediate Java programmers and junior developers think of somebody who is able to teach those how to improve their programming skills. That could be the lecturer in a programming class or the seasoned Java developer at the company.
From my experience I would say at least 2-3 years of regular coding (open source or for a living) in a team are required to get enough experience call oneself an "expert".

I wonder what the other ranchers think about that? When is somebody a true (Java/programming) expert?


Cheers,
Linus
 
Geff Chang
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Linus: Thanks for clarifying. It seems I misunderstood.

I thought the "expert programmers" in the description meant the authors picked up some code (from Open Source, or some other reference) from expert programmers/SMEs and used them as baseline to compare my/reader's code with.
 
author
Ranch Foreman
Posts: 20
6
IntelliJ IDE Java Ruby
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Geff,

it's actually the other way round: we took code from Java beginner's and show how to improve that by means of a before/after comparison - and if you apply all items on your code, your code will look like written by a professional/expert. But I can see that "comparing your code to that of expert programmers" can be a bit misleading - too much marketing... :-)

Best,
Simon
 
Geff Chang
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Simon: I see. Looks like it will still be interesting to read.
 
Simon Harrer
author
Ranch Foreman
Posts: 20
6
IntelliJ IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Geff, I can assure you, it is probably an interesting read for most developers. Even long-time professionals from very well-known companies told us they still got more than a little something out of the book. :-)
 
Marshal
Posts: 58328
178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Simon Harrer wrote:. . . code from Java beginner's and show how to improve that . . .

How much do you shorten the code? When I was still working for my MSc, I took some UG modules, too. I found a lot of people there would ask for advice about a bit of code and I could often simply delete about 50% of it.

You don't need that. You can delete it; it doesn't actually do anything.

Of course, that was after a year's experience on the Ranch learning from people like Ulf Dittmer, Jim Yingst, and the other staff at the time. [That was before I was a mod.]
 
Marshal
Posts: 5589
383
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After reading one of the sample chapters, I've decided to win the book. Pre-ordered on amazon.
 
Linus Dietz
author
Ranch Foreman
Posts: 8
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:

Simon Harrer wrote:. . . code from Java beginner's and show how to improve that . . .

How much do you shorten the code? When I was still working for my MSc, I took some UG modules, too. I found a lot of people there would ask for advice about a bit of code and I could often simply delete about 50% of it.



We don't advertise for the shorter code at all costs. Often a bit of duplication often makes the code clearer than cramming complex logic into a one-liner. One example would be the free sample comparison on Split Method with Boolean Parameters: https://media.pragprog.com/titles/javacomp/split.pdf
There we convert one method into two. Thats a bit more code, but makes everything clearer.
 
Campbell Ritchie
Marshal
Posts: 58328
178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you

Linus Dietz wrote:. . . cramming complex logic into a one-liner. . . . .

That isn't quite what I meant, but I have seen C books advocating really short code which would go down well at an Obfuscated C contest.
 
Geff Chang
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:Thank you

Linus Dietz wrote:. . . cramming complex logic into a one-liner. . . . .

That isn't quite what I meant, but I have seen C books advocating really short code which would go down well at an Obfuscated C contest.



Obfuscated C is not the kind of source code you want to review on a daily basis.
( and I would reject any Merge Request of that nature )

You want code that's maintainable and easy to understand, not something that's trying to be smart,
so that even any greenhorn who just joined the project can understand what the code does.
 
Sheriff
Posts: 11745
191
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Linus Dietz wrote:One example would be the free sample comparison on Split Method with Boolean Parameters: https://media.pragprog.com/titles/javacomp/split.pdf
There we convert one method into two. Thats a bit more code, but makes everything clearer.


The motivation to refactor is good. I like that you included this in the book but I also think the suggested refactoring still has problems, specifically, it changed the semantics and it created a leaky abstraction. See my comment here: https://coderanch.com/t/693047/java/Java-Comparison-tip-practices#3253140
 
Campbell Ritchie
Marshal
Posts: 58328
178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Geff Chang wrote:. . . Obfuscated C is not the kind of source code you want to review on a daily basis. . . .

Hahahahahahahahahahahahaha! Or on a basis of once a lifetime even. Fortunately I haven't seen anybody post that sort of code anywhere for ages. The best C++ code I remember seeing was when some Brazilian chappie decided to upgrade/create some malware for Symbian; this was about twelve years ago. I found the source code somewhere and my first thought about it was what good code style he had used.

This Wikipedia link says it was Marcos Velasco. I think he sent the code to Karspersky, Inc. before letting it go anywhere else.
 
Ranch Hand
Posts: 428
Java jQuery Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


From my experience I would say at least 2-3 years of regular coding (open source or for a living) in a team are required to get enough experience call oneself an "expert".



Really??!! I would call 2-3 experience a junior developer at best, I wouldn't call anyone with 2-3 years experience in anything an expert! I have been a Java developer for going on 18 years and I wouldn't call myself an expert.
 
Junilu Lacar
Sheriff
Posts: 11745
191
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Will Myers wrote:

From my experience I would say at least 2-3 years of regular coding (open source or for a living) in a team are required to get enough experience call oneself an "expert".

Really??!! I would call 2-3 experience a junior developer at best, I wouldn't call anyone with 2-3 years experience in anything an expert! I have been a Java developer for going on 18 years and I wouldn't call myself an expert.


It's all relative. To me, "years of experience" does not necessarily have a 1:1 relationship with the number of calendar years spent working. Someone with 2-3 years of experience working with a really good mentor can be much more of an expert than someone who has developed a lot of bad habits after working twice as long in the field.

To me, "experience" is more related to the number of things you've learned and how those learnings have shaped your ability to analyze problems and apply appropriate solutions. The number of things you learn is often related to the number of mistakes you've made. There is, after all, the saying that "Experience is that wonderful thing that allows you recognize a mistake when you make it again." Or to quote Yoda, "The greatest teacher failure is."

One engineer I've been mentoring since January has been working in the field for less than 5 years. When I showed him the original code in the "Split method with a boolean parameter" example the author cited, he immediately suggested using logClassified() and logUnclassified() methods. I thought that showed a development IQ far greater than what most developers with less than 5 years of work experience in the field would show. I'd like to think that it wasn't just coincidence that his suggestion happened to match what I suggested.

But then when I showed him the authors' solution, he was almost immediately swayed into accepting it as being better than what he had suggested. I stopped him and explained why his instincts were correct and was actually better in my opinion. That's experience.

Also, there's breadth and depth of expertise. Java is very broad. Nobody can be an expert in everything Java. But you can have deep expertise in one area or you can have good knowledge in a broad range of areas. That can still make you more knowledgeable and hence appear to be an "expert" to people who have little to no knowledge in any of those areas.
 
Junilu Lacar
Sheriff
Posts: 11745
191
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Will Myers wrote:I have been a Java developer for going on 18 years and I wouldn't call myself an expert.


BTW, that's usually a good indicator that you are in fact an expert. Look up the Dunning–Kruger effect

Kind of like how heroes never call themselves heroes.
 
Bartender
Posts: 1773
45
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let me quote Dr. Henry Wu:

Monster is a relative term. To a canary, a cat is a monster. We’re just used to being the cat.


Similarly, Expert is a relative term. To a junior developer, a 10 year experienced guy is an Expert.


(The above quote is from jurassic world.)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!