Jump to content

I just finished writing a python script that builds a convoluted docker image and deploys it to ...


Dottleshead

Recommended Posts

Rancher!  Talk about confusing as hell.  I inherited this software project from this guy before he left the company and there was no documentation on how to build, store, and deploy or fix issues.  Turns out he had a nasty hardcoded database value bured in a gazillion modules that was throwing the whole thing off. It was painful but I learned a lot.  I may have grown chest hair.  Rancher is a pain in the ass.  

  • Heart 2
  • Hugs 1
Link to comment
Share on other sites

I simply haven't been spending enough time on my "learn Python programming".  The ultimate goal was to produce something similar to "Chargemaster 2" on a Raspberry vs on a windows machine for which it was written.  That's a monitor and graphical program displaying the status of batteries under charge from Hitec chargers usb outputs.

  • Heart 2
Link to comment
Share on other sites

I often hear about how fantastic Python is.  I've looked at it and decided not to pursue learning it.

I started programming in C back in maybe 1990.  The C style syntax is like a warm blanket to me.  Knowing C, C++, Java and C# has served me well.  

I am tempted to learn COBOL though.  That seems to be were job security lies as corporations need to maintain their legacy applications.  

  • Heart 1
  • Awesome 1
Link to comment
Share on other sites

5 minutes ago, Mr. Silly said:

I often hear about how fantastic Python is.  I've looked at it and decided not to pursue learning it.

I started programming in C back in maybe 1990.  The C style syntax is like a warm blanket to me.  Knowing C, C++, Java and C# has served me well.  

I am tempted to learn COBOL though.  That seems to be were job security lies as corporations need to maintain their legacy applications.  

There was no job security for "machine language" programmers.  :(

  • Heart 1
  • Sad 1
Link to comment
Share on other sites

3 minutes ago, maddmaxx said:

There was no job security for "machine language" programmers.  :(

Assembler is pain in the ass.  I understand that even most embedded systems are written in C now.  CPU power and RAM are so inexpensive now that there is little need to try to try to minimize the program's footprint by writing in in machine language.  Another thing, compilers and linkers are so smart that they can do a better job optimizing the program than the programmer.  

  • Heart 1
Link to comment
Share on other sites

2 minutes ago, Mr. Silly said:

Assembler is pain in the ass.  I understand that even most embedded systems are written in C now.  CPU power and RAM are so inexpensive now that there is little need to try to try to minimize the program's footprint by writing in in machine language.  Another thing, compilers and linkers are so smart that they can do a better job optimizing the program than the programmer.  

When I started, Assembler was a high level language.  I learned to program in native machine code.  When assemblers became available my thoughts were "wow, you can make an indexed jump to a label" without actually having to calculate the address".  :P  Pretty soon even higher level languages came along an people began to believe that assembler was difficult.  :P

A while later, the earth cooled too much and the dyno's began to fade away.

  • Heart 1
  • Haha 2
Link to comment
Share on other sites

16 minutes ago, maddmaxx said:

punched card readers

I remember learning FORTAN back in collect and creating decks of punch cards for our programs,   Dropping a deck of cards sucked..   Waiting for the batch process to run you program, only to get an error message on a line printer sucked too.

  • Heart 2
  • Haha 1
Link to comment
Share on other sites

59 minutes ago, Bikeguy said:

I remember learning FORTAN back in collect and creating decks of punch cards for our programs,   Dropping a deck of cards sucked..   Waiting for the batch process to run you program, only to get an error message on a line printer sucked too.

Yep, learned BASIC first semester and FORTRAN second semester. Teletypes & cards, Yippee!

Link to comment
Share on other sites

2 minutes ago, 2Far said:

Yep, learned BASIC first semester and FORTRAN second semester. Teletypes & cards, Yippee!

Yeah learned BASIC on my old Apple 2E,   I wrote a program (moistly to learn the language) to track my mortgage payments.  

A few years ago I purchased a HP 50G calculator, just to see what the programming language was like.   The users manuals are hundreds of pages long (PDF files), the advanced user manual is 900+ pages long.  OMG who has the time to learn this?  It was simpler to write a macro in Excel.    That said, the calculator probably has way more computing power than most of the computers they used to to land a man on the moon.

I just used what I knew about programming to help me with my job. 

Link to comment
Share on other sites

26 minutes ago, Bikeguy said:

Yeah learned BASIC on my old Apple 2E,   I wrote a program (moistly to learn the language) to track my mortgage payments.  

A few years ago I purchased a HP 50G calculator, just to see what the programming language was like.   The users manuals are hundreds of pages long (PDF files), the advanced user manual is 900+ pages long.  OMG who has the time to learn this?  It was simpler to write a macro in Excel.    That said, the calculator probably has way more computing power than most of the computers they used to to land a man on the moon.

I just used what I knew about programming to help me with my job. 

My Radio Shack Color Computer, modified very much and running OS8 had more computing power than the Cyber 17's data logging the engine tests in our test cells.  I suspect it had more computing power than the Space Shuttle did on it's original flight.  Each pair of our test cells had 32K of 16 bit core memory.  Yep, that's right, little magnetic circles with wires running through them at 90 deg angles.  Transistors with no chips in sight.  That computer was about the size of two dining room tables set end to end.  The clock ckt was trimmed by adding or removing inches of wire from a spool of wire used for a delay line.

You kids have no idea.

  • Awesome 1
Link to comment
Share on other sites

4 hours ago, maddmaxx said:

73.  I come from the era of teletypes and punched card readers and progressed through the growth from native machine code to space qualified programmable CPU's on a chip.   At one point I had to be able to fat finger the machine code into a computer via front panel switches to jump start the card reader to accept a programming deck of cards for troubleshooting.  I learned my machine code programming by going through the instruction register of a CDC cyber 17 transistor by transistor following the program instructions.

I'm much more qualified to work in the bit banging parts of the industrial world than in the business world.  The best part of my software career was in having a big hand in designing the PLC controller systems that ran the jet engine test cells for P&W aircraft.  We were later told by the manufacturer's reps of the hardware company that we were handling the largest PLC program in North America.

Very cool

  • Heart 2
Link to comment
Share on other sites

2 hours ago, Bikeguy said:

Yeah learned BASIC on my old Apple 2E,   I wrote a program (moistly to learn the language) to track my mortgage payments.  

My first language was BASIC in 8th grade in 1980.   Wrote program that played Battleship on a teletype dialed into a mainframe at a local college.  Since then, I wrote a command line versions of Battleship in FORTRAN, C, Java, C++.  I used the game as a program I can write to learn the language.  

  • Heart 1
Link to comment
Share on other sites

5 minutes ago, Mr. Silly said:

My first language was BASIC in 8th grade in 1980.   Wrote program that played Battleship on a teletype dialed into a mainframe at a local college.  Since then, I wrote a command line versions of Battleship in FORTRAN, C, Java, C++.  I used the game as a program I can write to learn the language.  

Did you graduate in '84?

Link to comment
Share on other sites

4 hours ago, maddmaxx said:

73.  I come from the era of teletypes and punched card readers and progressed through the growth from native machine code to space qualified programmable CPU's on a chip.   At one point I had to be able to fat finger the machine code into a computer via front panel switches to jump start the card reader to accept a programming deck of cards for troubleshooting.  I learned my machine code programming by going through the instruction register of a CDC cyber 17 transistor by transistor following the program instructions.

I'm much more qualified to work in the bit banging parts of the industrial world than in the business world.  The best part of my software career was in having a big hand in designing the PLC controller systems that ran the jet engine test cells for P&W aircraft.  We were later told by the manufacturer's reps of the hardware company that we were handling the largest PLC program in North America.

 

12 minutes ago, Mr. Silly said:

Very cool

It took me a few years of posting with Max before he finally shared with me his working background. It's impressive. He's a bonafide gearhead.

Link to comment
Share on other sites

5 hours ago, Mr. Silly said:

I often hear about how fantastic Python is.  I've looked at it and decided not to pursue learning it.

I didn't really get it either until I joined this company and was essentially required to pick it up.  I was resistant at first wondering what the big deal was but I have since grown to love it.  It's a powerful interpretive language that's super easy to build things with.  No compiling and no linking.  It's like writing your shell scripts on steroids as it includes object oriented programming.  And chances are somebody has already developed a class that you need available to download and run immediately. But then so does Java and C#. I doubt I will ever go back to a compiled language as most of the things I do don't require speed. On my job, I don't develop the algorithms -- I test them.  

Link to comment
Share on other sites

1 hour ago, Dottles said:

 

It took me a few years of posting with Max before he finally shared with me his working background. It's impressive. He's a bonafide gearhead.

It's like going to a museum and looking at balloon flight before the Wright Bros came along.

I doubt that I could survive for long in for a modern computer department.  

But

Because we did it, you don't have to.

  • Heart 1
Link to comment
Share on other sites

53 minutes ago, maddmaxx said:

It's like going to a museum and looking at balloon flight before the Wright Bros came along.

I doubt that I could survive for long in for a modern computer department.  

But

Because we did it, you don't have to.

Well you are a electrical engineer, no?  Not that it matters, but I am grateful that I can at least appreciate your services.  Working with those earlier machines was not for the weak.  That kind of stuff you and @Bikeguy did was not for the average folk. I think I could have done it but you would have had to lock me in a room for a week or two just to do the simple stuff.  Bridging that level of detail with the business world would have been damn near impossible. Just a simple change would have a rippling effect throughout the program.

Link to comment
Share on other sites

I loved my little foray into Assembler, I just had to do enough to hook into an assembler program and then did the rest in Fortran.  The program I hooked into was one of the most impressively documented programs I ever saw - this bit set by so and so and reset by someother so and so. 

I started trying to learn python but lost interest and didn't really have a need for it.  It's a lot easier just to post here and watch Better Call Saul. :D

 

  • Heart 1
  • Haha 1
Link to comment
Share on other sites

6 minutes ago, RalphWaldoMooseworth said:

I loved my little foray into Assembler, I just had to do enough to hook into an assembler program and then did the rest in Fortran.  The program I hooked into was one of the most impressively documented programs I ever saw - this bit set by so and so and reset by someother so and so. 

I started trying to learn python but lost interest and didn't really have a need for it.  It's a lot easier just to post here and watch Better Call Saul. :D

 

That's what PLC programming was like back then.  We programmed in pictures that looked like the prints electricians use with various contacts routing power from the left power line to the right ground line.  I can't draw the pics here but it went like this

If start motor switch contacts or if start engine subroutine open then route power to imaginary bit start engine subroutine. (opens subroutine or keeps it open  after the operator takes his finger off the switch till the open flag is cleared)

If start routine bit set then route power to starter motor air supply 

If start routine bit set and engine RPM > 1000 then route power to igintion

If start routine bit set and engine RPM> 1500 and ignition feed back set and engine control lever contact in start position the route power to fuel supply

If starter air pressure switch and fuel flow switch then route power to start motor switch backlight.

and on and on and on.  The main program which was mostly subroutine calls took about 38 milliseconds to loop back to the beginning and that subroutine would be entered on each program pass till it was told to stop.  That first line in the subroutine would set up a last pass through unsetting all the bits called if the operator took his finger off the button and the PLC detected a running engine.  Fuel flow would be turned over to another subroutine and the engine throttle and condition levers would be given command of the engine.  There was more in the subroutine for failure mode checks.  For example if ignition was not sensed after being called, the operators start button would not backlight but instead would blink indicating a start failure and indicating that this would be a good time for human intervention.

The great thing about this sort of program is that one could plug in a laptop and watch all the contacts opening and closing in real time on the monitor.  You could immediately see which event or non event was causing the failure and see what was needed to fix it.

Even better...............you had to be completely mad to understand all the possibilities and include some sort of handler in the program to take care of it.  One had to understand the operator control station, the engine and all of the test cell facilities, how they worked and how they failed and what might happen if none of the above happened.

It was glorious.

 

  • Awesome 1
Link to comment
Share on other sites

36 minutes ago, maddmaxx said:

Even better...............you had to be completely mad to understand all the possibilities and include some sort of handler in the program to take care of it. 

Yeah, I was good at visualizing how you expected some code (mostly Excel macros) to execute, based on ‘typical’ user data and/or input.  The fun was to trap errors from bad data, or unexpected user selections.   From time to time, I’d get calls, your macro crashed.  I’d see what they did or the data that was being manipulated, and OMG I never expected THAT.  So, the next version was released with more robust error trapping.

Me… just a geek mechanical engineer, who knew enough about programming to be dangerous.   And saved a LOT of time for our department with some of my Excel work. 

My real job was not programming, but working with customers.  Yeah go figure…  I learned more on the job about interactions between people.  I got good at reading situations and people too.

  • Heart 4
Link to comment
Share on other sites

9 hours ago, Bikeguy said:

I remember learning FORTAN back in collect and creating decks of punch cards for our programs,   Dropping a deck of cards sucked..   Waiting for the batch process to run you program, only to get an error message on a line printer sucked too.

Fortran was my first language in college, around 1970, and the when I bought Apple II Plus. Then our chemistry department got a Wang 700 computer that was programmed in Machine Language, where you flipped toggle switches representing 1's, 2's, 4's and 8's then entering to generate commands and numbers in hexadecimal. I had a job doing organic synthesis and kinetics and I needed a program to calculate reaction rates, so I learned enough machine language to do so.  It turned out that was very useful a decade later.

Later, I got Apple II Plus serial #00809 and I learned basic, but I also was given a copy of Steve Wozniak's Assembly Language Compiler.  I used machine language and that assembler to write Castles of Darkness in 1981, the first animated adventure game. Yes, you can find me in the Giant List of Classic Game Programmers for it: https://dadgum.com/giantlist/

After that, lone programmers couldn't get published and larger programming and publishing companies dominated.  I didn't think it would be very profitable for me - most of the programmers doubled as workers at those companies computer and gaming stores.  I wanted to leave industrial chemistry due to carcinogenic hazards and guy on the softball team I played on said, "Our brother's a high school teacher, talk to him."  So that was the career I finished.

 

  • Heart 2
  • Awesome 1
Link to comment
Share on other sites

4 hours ago, Bikeguy said:

The fun was to trap errors from bad data, or unexpected user selections.   From time to time, I’d get calls, your macro crashed.  I’d see what they did or the data that was being manipulated, and OMG I never expected THAT.  So, the next version was released with more robust error trapping.

First of all, that's called programming.

Object oriented languages like C++ and Java have the try/catch/finally block that makes handing the error more graceful.  The program may not work with goofy user input but at least it won't crash the system.  

8 hours ago, Dottles said:

And chances are somebody has already developed a class that you need available to download and run immediately. But then so does Java and C#. I doubt I will ever go back to a compiled language as most of the things I do don't require speed.

C# is my goto.  It has a pretty robust set of free class libraries and there is pretty good on-line community for support.  

I agree with you about the compiled language thing. I am not even that keen on standard interpreted languages.  If I have a problem to solve, I am reaching for a JVM or .Net.  

Link to comment
Share on other sites

20 hours ago, maddmaxx said:

started, Assembler

I took a class at Case. We had to sign a document stating we would not write worms or viruses while coding in the lab.   We were told that someone would inevitably do it anyway.  Someone did - - you can't trust nerds.  Anyway, the lab was isolated from the internet and the local network of the college.  There were some extremely brilliant people in the class. Some of them were so intelligent they bordered a higher level of existence and enlightenment.  I was generally high on pain pills and vodka. I really enjoyed that class.  Afterwards, I decided coding wasn't really my thing. 

 

  • Haha 1
Link to comment
Share on other sites

48 minutes ago, Couch_Incident said:

I took a class at Case. We had to sign a document stating we would not write worms or viruses while coding in the lab.   We were told that someone would inevitably do it anyway.  Someone did - - you can't trust nerds.  Anyway, the lab was isolated from the internet and the local network of the college.  There were some extremely brilliant people in the class. Some of them were so intelligent they bordered a higher level of existence and enlightenment.  I was generally high on pain pills and vodka. I really enjoyed that class.  Afterwards, I decided coding wasn't really my thing. 

 

NERDS!

  • Haha 1
Link to comment
Share on other sites

15 hours ago, Bikeguy said:

Yeah, I was good at visualizing how you expected some code (mostly Excel macros) to execute, based on ‘typical’ user data and/or input.  The fun was to trap errors from bad data, or unexpected user selections.   From time to time, I’d get calls, your macro crashed.  I’d see what they did or the data that was being manipulated, and OMG I never expected THAT.  So, the next version was released with more robust error trapping.

Me… just a geek mechanical engineer, who knew enough about programming to be dangerous.   And saved a LOT of time for our department with some of my Excel work. 

My real job was not programming, but working with customers.  Yeah go figure…  I learned more on the job about interactions between people.  I got good at reading situations and people too.

I have been quite impressed at what some people can do with excel vba. I dabbled in it a tad bit it is a pretty steep learning curve as far as I am concerned. 

Link to comment
Share on other sites

25 minutes ago, RalphWaldoMooseworth said:

I have been quite impressed at what some people can do with excel vba. I dabbled in it a tad bit it is a pretty steep learning curve as far as I am concerned. 

If you manually run through the process you want with "record macro" running, you've almost always have a pretty good start.

Link to comment
Share on other sites

37 minutes ago, Mr. Silly said:

If you manually run through the process you want with "record macro" running, you've almost always have a pretty good start.

This works for many tasks.  However in some cases it may not be the most efficient coding, but it will work. 

I've searched the internet for specific help.  Reading the help screens in Excel can help too.  

I used my old HP41C calculator, with the printer, and a tape drive to store the data for our golf league.  I collect the score cards and enter the data before I had too many beers, and print out the results, team standings, handicaps, etc...  at the golf course.  

Yeah like I said a real geek.. 

Link to comment
Share on other sites

2 hours ago, Bikeguy said:

This works for many tasks.  However in some cases it may not be the most efficient coding, but it will work. 

I've searched the internet for specific help.  Reading the help screens in Excel can help too.  

I used my old HP41C calculator, with the printer, and a tape drive to store the data for our golf league.  I collect the score cards and enter the data before I had too many beers, and print out the results, team standings, handicaps, etc...  at the golf course.  

Yeah like I said a real geek.. 

My old boss ran the Fortran IV program for the golf league that one of his predecessors had written. :D  This was started well before PCs and survived a fairly long time even after they arrived. :)

I've always had trouble recording Excel mackerels, mainly because of relative vs absolute referencing I think.

One of the best bang for the buck ones I saw would compare two spreadsheets cell by cell.  Small and simple, but incredibly powerful. 

 

Link to comment
Share on other sites

16 hours ago, Mr. Silly said:

I have been quite impressed at what some people can do with excel vba.

You can do almost anything that you could do with VB6 using VBA.  It is available to anyone who has a version of Office installed, and it is excellent for Rapid Application Development.  I use it for a lot of things, including some that have nothing to do with Office documents.

 

Link to comment
Share on other sites

On 4/1/2020 at 6:50 AM, Mr. Silly said:

I am tempted to learn COBOL though.  That seems to be were job security lies as corporations need to maintain their legacy applications.  

Now is the time to learn COBAL and probably get paid a lot. 

https://www.cnbc.com/2020/04/06/new-jersey-seeks-cobol-programmers-to-fix-unemployment-system.html

  • Heart 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...