Results 1 to 4 of 4
- 03-26-2012, 04:40 PM #1
Senior Member
- Join Date
- Feb 2012
- Posts
- 117
- Rep Power
- 0
Arguments for/against rewriting API classes/methods?
Not sure if this is the right place for this. Please move this if necessary.
So one of my (student) peers has started yet another project in Java. He sometimes comes to me with questions about his code. He's coded for a few (2?) years now, in Java, but seems to be willfully unaware of the classes and methods available in the core Java API. Thus, his projects end up with several classes that reproduce all the behavior of pre-existing code, especially in graphics. So far I've seen code that reproduces Shape, Rectangle (extends "Shape"), Point, and others, all with less functionality and less efficiency than the standard. He uses Java.util.List at least.
These projects are personal projects only - there's no maintainability aspect here, only the matter of time/effort spent coding, and the effect this will have on his coding abilities in the future (since he's not learning anything about the assumed standards of coding). He claims that when he gets a "real job" coding, he'll just learn the API, since "it's not that hard".
How/should I convince him to use the pre-existing code available to him? Would his way benefit him in the long run since he's recreated the code he'd use in the future (and thus might have a better understanding of the low level mechanics?)
Should I just give him the help he asks for when he comes to me, thereby propagating his code style, or should I try to show him where it's been done before?
- 03-26-2012, 05:08 PM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Re: Arguments for/against rewriting API classes/methods?
An employer will be more interested in someone that already knows the API, rather than someone who has decided to learn on the job (ie on the employers time).
Indeed, API questions (general ones) do come up in many interviews.
Knowing how to navigate the API is also an important skill (see how many times we point people to that document on here).Please do not ask for code as refusal often offends.
- 03-26-2012, 05:45 PM #3
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,408
- Blog Entries
- 7
- Rep Power
- 17
Re: Arguments for/against rewriting API classes/methods?
Maybe your friend suffers from the NIH syndrome (Not Invented Here) so he writes everything himself. Sun (now Oracle) had lots of people working on the classes in the code SE set; it's much to much to do yourself (as you already noticed on the code your friend wrote). The NIH syndrome isolates you from the rest of the world. If you have good reasons you can critisize those 'standard' classes and maybe 'they'll even listen ... otherwise 'go with the flow' and use those standard classes.
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 04-04-2012, 03:18 PM #4
Member
- Join Date
- Mar 2012
- Location
- Novosibirsk, Russia
- Posts
- 13
- Rep Power
- 0
Similar Threads
-
Trouble with static methods and boolean equals() methods with classes
By dreamingofgreen in forum New To JavaReplies: 8Last Post: 04-16-2012, 11:00 PM -
passing arguments to other methods
By popeyito18 in forum New To JavaReplies: 2Last Post: 07-02-2011, 11:01 PM -
Help: Methods and Arguments
By whateverme in forum New To JavaReplies: 5Last Post: 12-12-2010, 12:14 AM -
Classes and Methods help
By border9 in forum New To JavaReplies: 5Last Post: 01-30-2009, 06:51 PM -
url rewriting
By jithan in forum Java ServletReplies: 2Last Post: 06-23-2008, 06:11 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks