Freelance, discreet code clean-up and review?

Q&A's, tips, howto's
Locked
kanen
Posts: 145
Joined: Thu Mar 25, 2010 6:24 pm
Contact:

Freelance, discreet code clean-up and review?

Post by kanen »

I have dozens of newLisp modules. Each of these modules needs to be reviewed and cleaned up by someone who knows newLisp (and JSON and networking, hopefully). Some of the modules are small, some are large.

It pays, via Paypal, based on small set pieces of code that need to be cleaned up.

Each module is between $50 and $100 for a code review and cleanup. If a bunch of new code needs to be written, we'd negotiate that as a new project.

It's pretty straightforward, I'm just looking for more eyes on the code and trying to help the newLisp community make a little extra cash for the holidays (and, of course, fix my code!).

Here's a terrible, quickly written example with comments:

Code: Select all

;; @syntax Util:Interfaces
;; @return <list of interfaces>
;; @param NA
;; 
(define (Interfaces)
	(set 'iface (exec "ifconfig -a"))
	(set 'final-iface nil)
	(dolist (x iface)
		(set 'curline (trim x "\t\t"))  
		; (println "Current line" $idx " : '" curline "'")
		;; Get the interface, if it exists
		(when (find "0: flags" curline ) 
			(set 'myface ((parse curline) 0)) )
		(when (starts-with curline "status: ")
			(when (= "active"((parse curline) 1))
				;(Log:Print "Result"  "Adding interface: " myface)
				(push myface final-iface -1)
				) 
			)
		;(println $idx "|" (trim x "\t\t"))
		;; hold it
		;; check for status: active
		;; save the interface (which is active) to the list
		;; return active interface list
		(set 'return-interfaces final-iface)
	)
)
. Kanen Flowers http://kanen.me .

ale870
Posts: 297
Joined: Mon Nov 26, 2007 8:01 pm
Location: Italy

Re: Freelance, discreet code clean-up and review?

Post by ale870 »

What do you mean for "clean-up"?
Rewrite code to be faster?
Rewrite code to eliminate wrong newLisp functions/structures?
Simply reindent/reformat the code?

Or.... ?
--

kanen
Posts: 145
Joined: Thu Mar 25, 2010 6:24 pm
Contact:

Re: Freelance, discreet code clean-up and review?

Post by kanen »

Could be any of these, depending on the code.
ale870 wrote:What do you mean for "clean-up"?
Rewrite code to be faster?
Rewrite code to eliminate wrong newLisp functions/structures?
Simply reindent/reformat the code?

Or.... ?
. Kanen Flowers http://kanen.me .

m i c h a e l
Posts: 394
Joined: Wed Apr 26, 2006 3:37 am
Location: Oregon, USA
Contact:

Re: Freelance, discreet code clean-up and review?

Post by m i c h a e l »

Hi Kanen!

I'm not able to take you up on your offer, but I did have a look at the code for Interfaces. It seems pretty tight, with the sole exception being the pair of whens testing for active status. They can be combined into one, with the two tests anded together. Little if any speed boost, unfortunately.

All the best on your new venture, kane|box!

m i c h a e l

Locked