Freelance, discreet code clean-up and review?

Started by kanen, December 16, 2010, 03:38:52 PM

Previous topic - Next topic

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:
;; @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 "tt"))  
; (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 "tt"))
;; 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[/url] .

ale870

#1
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

#2
Could be any of these, depending on the code.


Quote from: "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 Flowers http://kanen.me[/url] .

m i c h a e l

#3
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