Author Topic: ( Challenge ) Just curious  (Read 18552 times)

0 Members and 1 Guest are viewing this topic.

Andrea

  • Water Moccasin
  • Posts: 2372
Re: ( Challenge ) Just curious
« Reply #30 on: December 02, 2006, 09:55:06 AM »
ok....i've made some modification..


Code: [Select]
(defun c:minmax (/ timer f1 l1 lst #low #hi newfile)
(setq f1 (open (getfiled "Please select your file..." "" "csv" 8) "r")
      l1 (read-line f1))
  (setq timer (getvar "millisecs"))

(if l1 (setq newfile (open "c:\\result.txt" "w")))
(while l1
(setq lst (vl-sort (read (strcat "(" (acet-str-replace "," " "  l1) ")")) '<))
  (setq #hi (last lst)
        #low (car lst))
(write-line (strcat (rtos #hi) " " (rtos #low)) newfile)
(setq l1 (read-line f1)))

(close f1)
(close newfile)
 (princ (strcat "Process took " (rtos (/ (- (getvar "millisecs") timer) 1000.0) 2 2) " seconds."))
)
 
« Last Edit: December 02, 2006, 09:56:29 AM by Andrea »
Keep smile...

Andrea

  • Water Moccasin
  • Posts: 2372
Re: ( Challenge ) Just curious
« Reply #31 on: December 02, 2006, 10:04:51 AM »
or...much better....


Code: [Select]
(defun c:minmax (/ timer f1 l1 lst #low #hi newfile)
(setq f1 (open (getfiled "Please select your file..." "" "csv" 8) "r")
      l1 (read-line f1))
 

(if l1 (setq newfile (open "c:\\result.txt" "w")))
(while l1
(setq lst (vl-sort (read (strcat "(" (acet-str-replace "," " "  l1) ")")) '<))
  (setq #hi (last lst)
        #low (car lst))
(write-line (strcat (rtos #hi) " " (rtos #low)) newfile)
(setq l1 (read-line f1)))
(setq timer (getvar "millisecs"))
(command "_delay" "10")
(close f1)
(close newfile)
 (princ (strcat "Process took " (rtos (/ (- (getvar "millisecs") timer) 1000.0) 2 2) " seconds."))
 )

LOL   :lmao:
Keep smile...

ElpanovEvgeniy

  • Water Moccasin
  • Posts: 1569
  • Moscow (Russia)
Re: ( Challenge ) Just curious
« Reply #32 on: December 02, 2006, 10:07:55 AM »

Mark

  • Custom Title
  • Seagull
  • Posts: 28753
Re: ( Challenge ) Just curious
« Reply #33 on: December 02, 2006, 10:14:39 AM »
OK guys, I posted a new challenge [ http://www.theswamp.org/index.php?topic=13771.0 ], please post your code in that thread OK! :-)
TheSwamp.org  (serving the CAD community since 2003)

Joe Burke

  • Guest
Re: ( Challenge ) Just curious
« Reply #34 on: December 02, 2006, 10:46:09 AM »
Personally the word "challenge" will always turn me off immediately.

Why turn programming into a game show? It reminds me of the TV Food Network,
which was nice back when it was mostly about cooking rather than, "and the
winner is..."

These things could be presented as collaborative work. IOW, it's not a
competition, but rather a joint effort aimed at sharing knowledge. Which I
think is what this place is about. Right, Mark?

(setq str idea)
(if
  (or
    (eq str "winner")
    (eq str "loser")
  )
  (princ "\nBoring!")
  (princ "\nLet's kick it around.")
)

Mark

  • Custom Title
  • Seagull
  • Posts: 28753
Re: ( Challenge ) Just curious
« Reply #35 on: December 02, 2006, 11:17:20 AM »
Personally the word "challenge" will always turn me off immediately.
OK, what would you prefer?

Quote
These things could be presented as collaborative work. IOW, it's not a
competition, but rather a joint effort aimed at sharing knowledge. Which I
think is what this place is about. Right, Mark?
Well the last time I posted a collaborative project I was accused of using this forum and the members knowledge as a way of getting my work done, which of course I would never do. Being accused of that hurt my feelings, to say the least.

Perhaps "challenge" is the wrong word. I do feel we, the members, learn quite a lot from seeing the unique solutions of the others. Plus it gives us a way of showcasing our talent. So yes, sharing knowledge is what this place is all about.
TheSwamp.org  (serving the CAD community since 2003)

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: ( Challenge ) Just curious
« Reply #36 on: December 02, 2006, 11:36:58 AM »
Joe,
I like a "Challenge" & you don't have to make it a competition with others but
with yourself. It seems to be a "human nature" thing that turns the Challenge
into a "Competition". Although the competition usually focuses on speed, I see
it take on other goals as well. Mostly I see "Shortest number of lines" or
"Cleverest methods" but seldom do I see "Most Readable" or "Easiest to
maintain".

In a competition for the fastest we (I) discover methods or functions I did not
consider. For me, I think I learn something in each one of the "Challenges" and
it may not seem as though the aim was at sharing knowledge but knowledge was
shared none the less. As you pointed out they do turn into competitions rather
than collaborations.  I have seen times when "speed goals" do produce a
collaborate routine to get the best results.

It's tough to overcome human nature though.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Joe Burke

  • Guest
Re: ( Challenge ) Just curious
« Reply #37 on: December 02, 2006, 11:49:52 AM »
Mark,

The downside of backing off from what you think is right, is it tends to lend
support to those who accused you.

And BTW, what's wrong with using this forum as a way of getting your work done?
Who said that's not allowed? Or you shouldn't do that?

The more I read here, the more I don't understand.

What I want is an open ended forum where ideas flow freely without artificial constraints.

A "challenge" is an artifact by definition IMO.

Regards
Joe

Joe Burke

  • Guest
Re: ( Challenge ) Just curious
« Reply #38 on: December 02, 2006, 12:44:51 PM »
It's tough to overcome human nature though.

I don't accept the idea human nature is defined by competition, as you seem to imply. I think you are confusing evolution with what actually defines us as a species. Learning to cooperate with each other is primarily what sets us apart from all other species on the planet.

IOW, we demean ourselves when we let the primitive stuff kick in.

Excuses along the lines of, "tough to overcome" fall on deaf ears as far as I'm concerned. What I hear is just old nonsense applied to the web. The greateat tool yet invented aimed at cooperation.

Regards

JohnK

  • Administrator
  • Seagull
  • Posts: 10603
Re: ( Challenge ) Just curious
« Reply #39 on: December 02, 2006, 12:58:55 PM »
Pure semantics; the ``Taste'' of theSwamp has always been ``help'' over ``flame''. Everyone knows that when you participate in a `challange' you are entering the classroom where everyone is a teacher. The whole idea behind the ``challanges'' i was seeking when i created them was to promote fun with learning. The concept was to promote creative thinking --take this ``simple'' task and make it better, faster, cleaner, funny, difficult, whatever you want.

The whole goal was to show everyone the bounds of the common computer process--believie it or not a programing language is only a gateway, logic is logic.


TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Joe Burke

  • Guest
Re: ( Challenge ) Just curious
« Reply #40 on: December 02, 2006, 01:20:34 PM »
It's not a matter of semantics given I saw a message from Luis recently which said something like, "someone should judge the entries and declare a winner."

Ya'll may choose to distance yourselves from this nonsense. So be it.

All I'm interested in is an end to it.

Please know I'm not flaming here or accusing anyone of anything. I just think we could do better than what we've done.

LE

  • Guest
Re: ( Challenge ) Just curious
« Reply #41 on: December 02, 2006, 01:32:54 PM »
I see a name like mine....   :roll:

and I remember posting something like that, and was more about that if someone start something - to me I want to see an end point a conclusion.

in my own case, when I like to participate it is first, to show my way of solving a problem, second because I do not have anything else to do and I prefer to waste my time in something that can keep my mind occupied, the only 2 brain cells left - required a lot of effort nowdays, third the part of seeing a winner was in a sarcastic form of saying "hey where is this topic going - or?"

and yes mi amigo Jose I agree with you.

 :-)
« Last Edit: December 02, 2006, 01:36:01 PM by LE »

Joe Burke

  • Guest
Re: ( Challenge ) Just curious
« Reply #42 on: December 02, 2006, 01:57:12 PM »
Luis,

Your two remaining brain cells still work better than whatever I have left.  ;-)

And BTW, I quoted you because I assumed you agreed with me. I read it, back when, as something similar to my point now.

Chuck Gabriel

  • Guest
Re: ( Challenge ) Just curious
« Reply #43 on: December 02, 2006, 02:11:46 PM »
I've always looked at the challenges as an opportunity to stretch my mind a little and see the various ways different folks approach the same problem.  There is usually a little good-natured competition, but I've never seen a challenge degenerate into anything ugly.

In summary, I think they are great.

JohnK

  • Administrator
  • Seagull
  • Posts: 10603
Re: ( Challenge ) Just curious
« Reply #44 on: December 02, 2006, 04:18:08 PM »
It's not a matter of semantics given I saw a message from Luis recently which said something like, "someone should judge the entries and declare a winner."

Ya'll may choose to distance yourselves from this nonsense. So be it.

All I'm interested in is an end to it.

Please know I'm not flaming here or accusing anyone of anything. I just think we could do better than what we've done.

And i have seen many a post from people that say ``challenge'' but sound suspiciously like actual work or actual needs (``phishing'' if you will). Well, wait a min; i came up the first challenge by taking something from actual work i was doing at the time. Now i guess it was alright, because i had already written my solution, and it was a ``trivial'' process to begin with. ...

I understand your feelings and I'm not saying that YOU were flaming anyone or anything... I was just making a blanket statement. I guess what i was trying to say is: when you offer help, should you feel the need to be gratified beyond a ``thanx dude''? Then theswamp isn't for you. We are a friendly bunch who LIKE to help for the sake of help not fame and glory. But you already know that, that's why your here....get it? (I don't know if that is gonna make any more sense or not, but I'm sure you know what I'm trying to say.)

And end to what? The Challenges or the World? (What is `it' --and don't try to tell me the answer can be found on eBay either....gawd i hate those stupid commercials.)

If you dont like the challenges, then i guess make a complant to the mods and or just dont participate it-sup to you dude.

BTW, did you read Cornbread's challenge. That was ama-az-zing!!
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org