Author Topic: -={ Challenge }=- Group List by Number  (Read 27087 times)

0 Members and 1 Guest are viewing this topic.

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: -={ Challenge }=- Group List by Number
« Reply #45 on: March 13, 2010, 05:34:45 PM »
I targeted all industries involving CAD design, but approached as a programmer (as I have very little experience in any particular field with my age and studies) - many said they were not interested, and others said they could not afford to take on anyone with the current financial climate... It would be a great job indeed to get paid to do what you love - you must be pretty happy Michael.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: -={ Challenge }=- Group List by Number
« Reply #46 on: March 13, 2010, 05:53:25 PM »
I targeted all industries involving CAD design, but approached as a programmer (as I have very little experience in any particular field with my age and studies) - many said they were not interested, and others said they could not afford to take on anyone with the current financial climate... It would be a great job indeed to get paid to do what you love

Maybe therein lies the rub. Earlier in my career I didn't try to get in on the merits of my programming, even tho I had close to 10 years programming experience before shaking hands with AutoCAD. I'd get in on the basis of interest in pursuing engineering, identifying I could do some automation if required. Once in the door opportunities to automate work processes etc. abound, as do the opportunities to demonstrate skills in said area. In no time the programming eclipses the engineering. This has repeated itself time and again. The last job I took, coming up 2 years now, was solely on the basis of learning how to design pipelines. I had zero experience. My programming wasn't even on the table. Just this week my boss gave the nod for a programming project estimated to have 900 hours programming and another 600 for documentation, training prep and training. Hope this inspires you or gives you alternative employment strategies.

Subtitle: The most direct path to your goals isn't always direct.

you must be pretty happy Michael.

Thru the miracle of drugs I'm working towards that, been a long ride.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: -={ Challenge }=- Group List by Number
« Reply #47 on: March 13, 2010, 05:59:06 PM »
Maybe therein lies the rub. Earlier in my career I didn't try to get in on the merits of my programming, even tho I had close to 10 years programming experience before shaking hands with AutoCAD. I'd get in on the basis of interest in pursuing engineering, identifying I could do some automation if required. Once in the door opportunities to automate work processes etc. abound, as do the opportunities to demonstrate skills in said area. In no time the programming eclipses the engineering. This has repeated itself time and again. The last job I took, coming up 2 years now, was solely on the basis of learning how to design pipelines. I had zero experience. My programming wasn't even on the table. Just this week my boss gave the nod for a programming project estimated to have 900 hours programming and another 600 for documentation, training prep and training. Hope this inspires you or gives you alternative employment strategies.

Subtitle: The most direct path to your goals isn't always direct.

That's some really good advice, thanks mate. I really see how that is a much better way in, and getting a lot of other experience along the way. Thanks  :-)

you must be pretty happy Michael.
Thru the miracle of drugs I'm working towards that, been a long ride.

Seriously?



MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: -={ Challenge }=- Group List by Number
« Reply #48 on: March 13, 2010, 06:08:09 PM »
That's some really good advice, thanks mate. I really see how that is a much better way in, and getting a lot of other experience along the way. Thanks  :-)

My great pleasure. The experience makes for interesting jobs. And the more varied your engineering background the greater your ability to adapt to new challenges. I've programmed everything from data loggers, water distribution analysis and modeling, water treatment plants, heat trace modeling to pipeline design automation. It has not been a boring ride. Incidentally, I was a high school drop out, never even finished grade 10, tho I have a bit of grade 11 math (the only subject I liked aside from science). I don't advocate this last bit of info as a strategy tho. It does underscore my statement "If I can do it surely you guys can".

you must be pretty happy Michael.
Thru the miracle of drugs I'm working towards that, been a long ride.

Seriously?

Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: -={ Challenge }=- Group List by Number
« Reply #49 on: March 13, 2010, 06:16:16 PM »
My great pleasure. The experience makes for interesting jobs. And the more varied your engineering background the greater your ability to adapt to new challenges. I've programmed everything from data loggers, water distribution analysis and modeling, water treatment plants, heat trace modeling to pipeline design automation. It has not been a boring ride. Incidentally, I was a high school drop out, never even finished grade 10, tho I have a bit of grade 11 math (the only subject I liked aside from science). I don't advocate this last bit of info as a strategy tho. It does underscore my statement "If I can do it surely you guys can".

Exactly, the more you apply yourself the more employable you become... great strategy (except the drop-out part   ;-) ) Thanks again.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: -={ Challenge }=- Group List by Number
« Reply #50 on: March 13, 2010, 06:50:49 PM »
Thanks again.

you're very welcome lee
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

wizman

  • Bull Frog
  • Posts: 290
Re: -={ Challenge }=- Group List by Number
« Reply #51 on: March 13, 2010, 07:58:23 PM »
my version, only for speed...

Code: [Select]
(defun GBN_1_EV (l n / b lst)
 (setq b (list '(reverse a)))
 (repeat (/ n 4)
  (setq b (cons '(setq
                  a
                  (cons (cadddr l) (cons (caddr l) (cons (cadr l) (cons (car l) a))))
                  l
                  (cddddr l)
                 ) ;_  setq
                b
          ) ;_  cons
  ) ;_  setq
 ) ;_  repeat
 (setq n (rem n 4))
 (repeat (/ n 3)
  (setq b (cons '(setq
                  a
                  (cons (caddr l) (cons (cadr l) (cons (car l) a)))
                  l
                  (cdddr l)
                 ) ;_  setq
                b
          ) ;_  cons
  ) ;_  setq
 ) ;_  repeat
 (setq n (rem n 3))
 (repeat (/ n 2)
  (setq b (cons '(setq
                  a
                  (cons (cadr l) (cons (car l) a))
                  l
                  (cddr l)
                 ) ;_  setq
                b
          ) ;_  cons
  ) ;_  setq
 ) ;_  repeat
 (setq n (rem n 2))
 (repeat (/ n 1)
  (setq b (cons '(setq
                  a
                  (cons (car l) a)
                  l
                  (cdr l)
                 ) ;_  setq
                b
          ) ;_  cons
  ) ;_  setq
 ) ;_  repeat
 (eval (cons 'defun (cons 'f1 (cons '(a) b))))
 (while l (setq lst (cons (f1 nil) lst)))
 (reverse lst)
)


Wow, You're very good at this Evgeniy.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: -={ Challenge }=- Group List by Number
« Reply #52 on: March 13, 2010, 09:06:42 PM »
Now we should convert it back to a single list.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: -={ Challenge }=- Group List by Number
« Reply #53 on: March 13, 2010, 10:56:53 PM »
Now we should convert it back to a single list.

see the squish function for one way
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: -={ Challenge }=- Group List by Number
« Reply #54 on: March 14, 2010, 08:03:26 AM »
Now we should convert it back to a single list.

see the squish function for one way

Interesting thread indeed - same technique that Evgeniy uses in his first code I believe  :-)

ElpanovEvgeniy

  • Water Moccasin
  • Posts: 1569
  • Moscow (Russia)
Re: -={ Challenge }=- Group List by Number
« Reply #55 on: March 14, 2010, 08:30:12 AM »
Interesting thread indeed - same technique that Evgeniy uses in his first code I believe  :-)

I was interested to write in this style. My function is easy to translate into a more familiar sight ...

Bhull1985

  • Guest
Re: -={ Challenge }=- Group List by Number
« Reply #56 on: March 03, 2014, 07:37:08 AM »
That's some really good advice, thanks mate. I really see how that is a much better way in, and getting a lot of other experience along the way. Thanks  :-)

My great pleasure. The experience makes for interesting jobs. And the more varied your engineering background the greater your ability to adapt to new challenges. I've programmed everything from data loggers, water distribution analysis and modeling, water treatment plants, heat trace modeling to pipeline design automation. It has not been a boring ride. Incidentally, I was a high school drop out, never even finished grade 10, tho I have a bit of grade 11 math (the only subject I liked aside from science). I don't advocate this last bit of info as a strategy tho. It does underscore my statement "If I can do it surely you guys can".

you must be pretty happy Michael.
Thru the miracle of drugs I'm working towards that, been a long ride.

Seriously?



Sorry to thread necro but this one was too interesting not to comment on.
I can fully attest to  the validity of what MP says, especially the comment about "once your foot is in the door, programming opportunities abound"
LISP is like a dirty little secret sometimes, that not a lot of companies want to strive to commit resources to because of the variable productiveness of any LISP routines they may have used in the past.
For me it was a family connection, so yeah I cheated...but that was how I got my foot in the door and since then I've ran with it. It's very possible. Drafting and design, with no college....just from knowing someone in the business who had a good relationship with their boss. Just enough of one to convince him to let me help out for a few days...after that, he approached me with a job offer. It wasn't until later that year at that same company that I was first introduced to lisp, only as a third-party gifted tool that at the time amazed me, due to the automation it exemplified....but it wasn't until half of a decade later that LISP would once again become a part of my career.
Gas and oil and architecture they're always going to be there....work will be around. If you can reach the people who are in management positions via family connection, out-of-work friendships, or the most basic method- employee to employer or from staff to management, then any intelligent person would leverage the power of automation upon the desires of cad-bees.
If you can code, and you're in a position to show how your code can be effective, this to me has been the only successful method in truly getting the 'o.k.' to code for a living.
I'm a fledling but lisp is so powerful I've been able to put code together that allowed 3 end-users to create an entire refinery's p&id processes , from scratch to 160 cad documents in a matter of weeks, nearly eliminating all of the red/greenlining that those same managers would spend hours of their own time to do. Now the same company has hired me direct and wants me to take a look at the electrical and civil structural processes in addition to see where I can streamline and/or make more efficient their existing methods. Not to interfere here guys, but hey try this out for size....even old-bears like it when the fish are dropped at their feet instead. Just made that metaphor up but I think it's apt.
It seems to me like there's a very small niche that autocad programmers fit into. Yet there's a ton of room for growth---I shudder to think of the efficiency someone such as lee could provide to a company willing to rework their processes from the ground up, integrating custom routines and applications to automate processes and eliminate the human error contained within the manual versions of those tasks...
My 2 cents, sry from the necro'in
« Last Edit: March 03, 2014, 08:15:03 AM by Bhull1985 »

chlh_jd

  • Guest
Re: -={ Challenge }=- Group List by Number
« Reply #57 on: March 05, 2014, 12:26:54 AM »
All of yours are very good !

Personally, I like the 3rd function of Lee Mac's .

The number group by , usually does not exceed 4 .

here just post my always use function .
Code: [Select]
(defun list-comp (a b / mid rslt)
    (repeat (/ (length a) b)
      (setq mid nil)
      (repeat b
(setq mid (cons (car a) mid)
      a   (cdr a)
)
      )
      (setq rslt (cons (reverse mid) rslt))
    )
  (if a (reverse (cons a rslt))
    (reverse rslt))
  )
« Last Edit: March 05, 2014, 12:42:52 AM by chlh_jd »

chlh_jd

  • Guest
Re: -={ Challenge }=- Group List by Number
« Reply #58 on: March 05, 2014, 12:57:57 AM »
my version, only for speed...

Code: [Select]
(defun GBN_1_EV (l n / b lst)
 (setq b (list '(reverse a)))
 (repeat (/ n 4)
  (setq b (cons '(setq
                  a
                  (cons (cadddr l) (cons (caddr l) (cons (cadr l) (cons (car l) a))))
                  l
                  (cddddr l)
                 ) ;_  setq
                b
          ) ;_  cons
  ) ;_  setq
 ) ;_  repeat
 (setq n (rem n 4))
 (repeat (/ n 3)
  (setq b (cons '(setq
                  a
                  (cons (caddr l) (cons (cadr l) (cons (car l) a)))
                  l
                  (cdddr l)
                 ) ;_  setq
                b
          ) ;_  cons
  ) ;_  setq
 ) ;_  repeat
 (setq n (rem n 3))
 (repeat (/ n 2)
  (setq b (cons '(setq
                  a
                  (cons (cadr l) (cons (car l) a))
                  l
                  (cddr l)
                 ) ;_  setq
                b
          ) ;_  cons
  ) ;_  setq
 ) ;_  repeat
 (setq n (rem n 2))
 (repeat (/ n 1)
  (setq b (cons '(setq
                  a
                  (cons (car l) a)
                  l
                  (cdr l)
                 ) ;_  setq
                b
          ) ;_  cons
  ) ;_  setq
 ) ;_  repeat
 (eval (cons 'defun (cons 'f1 (cons '(a) b))))
 (while l (setq lst (cons (f1 nil) lst)))
 (reverse lst)
)
Very profound code , Evgeniy  :-)
I take long time to learn it , thank you very much !
Personally , I would like use
Code: [Select]
(vl-list* (cadddr l) (caddr l) (cadr l) (car l) a)to replace
Code: [Select]
(cons (cadddr l) (cons (caddr l) (cons (cadr l) (cons (car l) a))))

chlh_jd

  • Guest
Re: -={ Challenge }=- Group List by Number
« Reply #59 on: March 05, 2014, 01:12:11 AM »
Some qustion :
Code: [Select]
(setq l '(1 2 3 4 5 6 7 8 9 10 11))(f l 3) get the result which one is better ?
Code: [Select]
((1 2 3) (4 5 6) (7 8 9) (10 11 nil))or
Code: [Select]
((1 2 3) (4 5 6) (7 8 9) (10 11))