?
Solved

What is this

Posted on 2000-03-01
5
Medium Priority
?
165 Views
Last Modified: 2013-12-25
I have been looking at job ads and have found statements like the following:

Must be able to write high
performance, reliable, maintainable code in a production environment.

What exactly are they talking about here?  What makes code 'high performance'? What makes it "maintainable"

Thanks for the help,
David
0
Comment
Question by:davlun20080
  • 3
  • 2
5 Comments
 
LVL 19

Accepted Solution

by:
cheekycj earned 200 total points
ID: 2576848
maintainable code is code that can be maintained by people besides you and can be updated easily.  Basically what they are saying is that your coding style cannot be such that no one but you understands it (whether it works or not is a different story)

High performance code is code that is written for speed and efficiency both in execution and memory usage... examples:  efficient usage of memory pointers in C++ and using malloc() properly.  Another example is not creating "new" object for everything in Java which is slower and a memory hog.

Efficient code for Java is like using BufferedReader vs. FileReader
Another example of efficient code is using a switch statement vs a looping if then else

CJ
0
 
LVL 3

Author Comment

by:davlun20080
ID: 2577198
Guess I should have prefaced this by saying I am looking at coding in html, javascript and asp.  So if I understand right, the code needs to be able to be read by someone else easily, does this mean commented well or does it mean the page is laidout logically.

Thanks for the pointer on the switch statment vs for..loop.  I assume that is Javascript applicable as well.  This is exactly the kind of information I am looking for, anything else?
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 2577555
comments are only half the story.. your comments should explain what you are doing but keep in mind what you are doing shouldn't take a mind reader to figure out.

for example:
to sort some data take a given approach like bubble sort or quick sort but some people like to write their own version of a sort that only they can understand and once they leave the company either spends too much time learning how he did it or they spend all this money to do it again from scratch.
(sorting isn't the best example but it should give you an idea)

When it comes to organizing your code you should always have it so it is easy to read and logistically simple.  Remember the rule: KISS- Keep it Simple Stupid (Silly)

Basically anything that is applicable to programming in general is applicable to JavaScript, Java, VBScript, JScript, PHP, Perl, C, C++ or any other language you may be using.

I have found optimiztions such as the following in java:
To compare two strings I was first trimming them then checking if they were equal and then return true or false when the optimized code in java looked like:
return (firstStr.trim()).equals(secondStr.trim());

One line replace 5 lines including and if then else.

I found out that in Java using the + concatenator uses more memory then the stringbuffer.append() command.

Other things like memory management (malloc in C and System.gc in Java) are essential to good clean up code.

CJ
0
 
LVL 3

Author Comment

by:davlun20080
ID: 2578582
Thanks for the info,
davlun
0

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
Over time, the online landscape has altered considerably, but that’s nothing compared to the up-and-coming trends that will shape the web design industry in the coming year. Keep reading to find out which trends will shape B2B web design in 2018.
This video teaches users how to migrate an existing Wordpress website to a new domain.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

589 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question