Sponsored Content
Full Discussion: Naive coding...
The Lounge What is on Your Mind? Naive coding... Post 302991920 by wisecracker on Saturday 18th of February 2017 10:47:17 AM
Old 02-18-2017
Naive coding...

"Naive coding."
(Apologies for any typos.)

I came across this phrase a couple of weeks ago and it has made me decide to set off a discussion.

I had never heard of it before but I did some research and discovered that I probably fall into this category.

My phrase is: "I code to work, not work to code!", so therefore I guess when viewing any of my code, pros' must think how primitive some of it looks.

So, what do you guys who code for a living think when you see some attempts of others solving problems and use _brute_force_methods_ for example to solve their coding problems when there are probably more elegant solutions?

Also what is wrong with a naive solution that works for the coder although it may not be anywhere near as fast as another method more obvious to someone else?

The plotting and drawing routines for example on AudioScope can't seem to be done any other way except by _brute_force_...

Comments......
 

7 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

can I use this coding

I apologise because I had pasted this question in the newbies forum first (because i am a bit of a newbie) but thought it might be better suited in here if i have to sepearate parameters can I use this syntax especially the or part (||) and is this correct if (6 Replies)
Discussion started by: w33man
6 Replies

2. Shell Programming and Scripting

Coding on my Mac

I would like to start coding on my mac, but I'm getting an error when I attempt to execute my script -bash : testscript: command not found I have verified that the #! line points to the correct directory. If you have some insight it would be greatly appreciated! - D (1 Reply)
Discussion started by: DKNUCKLES
1 Replies

3. UNIX for Dummies Questions & Answers

pro*c coding

Hi All, I am new to pro*C. I have a select statement as select a.ename,a.sal,a.empno from emp where &n=(select count(distinct(b.sal)) from emp b where a.sal<=b.sal for this query I have to write a pro*C program. So can you please send me the complete code. Then I will foloow the same... (1 Reply)
Discussion started by: user71408
1 Replies

4. Homework & Coursework Questions

Naive Bayes

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I have to write a program in Unix to do the following.Given a phrase like george hates john, by... (0 Replies)
Discussion started by: gizmo87
0 Replies

5. Shell Programming and Scripting

Need help with coding

HI, Can some one guide me how to make changes to the script below so that it can load the history of a program to IT server ? Format of data: YYYYMMDD065959.dsk.log YYYYMMDD235959.dsk.log currently both are loaded together. Need to separate them as above format. Thanks in advance. ... (1 Reply)
Discussion started by: crazydude80
1 Replies

6. Windows & DOS: Issues & Discussions

Need help with coding

HI, Can some one guide me how to make changes to the script below so that it can load the history of a program to IT server ? Format of data: YYYYMMDD065959.dsk.log YYYYMMDD235959.dsk.log currently both are loaded together. Need to separate them as above format. Thanks in advance. ... (2 Replies)
Discussion started by: crazydude80
2 Replies

7. Shell Programming and Scripting

HTTP coding

My company has an in house instant messaging system (like WhatsApp) where users can communicate with each other. I currently have code to email me certain items from my Sparc machine running SunOS 5.10. I want what I am emailing myself to now instant message me. The team that created the messenger... (5 Replies)
Discussion started by: shorty
5 Replies
UNIVERSAL::can(3)					User Contributed Perl Documentation					 UNIVERSAL::can(3)

NAME
UNIVERSAL::can - work around buggy code calling UNIVERSAL::can() as a function SYNOPSIS
To use this module, simply: use UNIVERSAL::can; DESCRIPTION
The UNIVERSAL class provides a few default methods so that all objects can use them. Object orientation allows programmers to override these methods in subclasses to provide more specific and appropriate behavior. Some authors call methods in the UNIVERSAL class on potential invocants as functions, bypassing any possible overriding. This is wrong and you should not do it. Unfortunately, not everyone heeds this warning and their bad code can break your good code. This module replaces "UNIVERSAL::can()" with a method that checks to see if the first argument is a valid invocant has its own "can()" method. If so, it gives a warning and calls the overridden method, working around buggy code. Otherwise, everything works as you might expect. Some people argue that you must call "UNIVERSAL::can()" as a function because you don't know if your proposed invocant is a valid invocant. That's silly. Use "blessed()" from Scalar::Util if you want to check that the potential invocant is an object or call the method anyway in an "eval" block and check for failure (though check the exception returned, as a poorly-written "can()" method could break Liskov and throw an exception other than "You can't call a method on this type of invocant"). Just don't break working code. AUTHOR
chromatic, "<chromatic@wgz.org>" BUGS
Please report any bugs or feature requests to "bug-universal-can@rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=UNIVERSAL-can>. This will contact me, hold onto patches so I don't drop them, and will notify you of progress on your request as I make changes. ACKNOWLEDGEMENTS
Inspired by UNIVERSAL::isa by Yuval Kogman, Autrijus Tang, and myself. Adam Kennedy has tirelessly made me tired by reporting potential bugs and suggesting ideas that found actual bugs. Mark Clements helped to track down an invalid invocant bug. Curtis "Ovid" Poe finally provided the inspiration I needed to clean up the interface. Peter du Marchie van Voorthuysen identified and fixed a problem with calling "SUPER::can". Daniel LeWarne found and fixed a deep recursion error. Norbert Buchmueller fixed an overloading bug in blessed invocants. The Perl QA list had a huge... discussion... which inspired my realization that this module needed to do what it does now. COPYRIGHT &; LICENSE Copyright (c) 2005 - 2011, chromatic. This module is made available under the same terms as Perl 5.12. POD ERRORS
Hey! The above document had some coding errors, which are explained below: Around line 146: Non-ASCII character seen before =encoding in 'Buchmueller'. Assuming UTF-8 perl v5.16.3 2012-07-26 UNIVERSAL::can(3)
All times are GMT -4. The time now is 10:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy