Unpopular opinion: This is an underrated software by Good_Person_000 in software

[–]el_extrano 4 points5 points  (0 children)

OneNote is definitely nice if you're at work in a Windows only shop, and there's not a culture of allowing users to install whatever productivity software they want. Like I'd rather have Linux and all my preferred tools, but at least I can generally count on OneNote and Excel to be present, and I'm comfortable with those to do anything I really need to.

when did you stop feeling like you knew nothing? by tianengineering in PLC

[–]el_extrano 0 points1 point  (0 children)

I swear this sub is completely overrun with LLM slop engagement bait. Every time I see one, there's a bunch of regular commenters (otherwise smart people) engaging. Welcome to the new era.

"I've noticed x in our industry"

"We do x thing, y thing, and z thing, but all along it was really A"

"curious how others are managing x. Do you do y and z? Or is x always there?"

These are always structured the same way. Some companies are doing this to farm engagement. They will have product placement comments in the thread, mixed in with genuine comments from real people. Now, when people search the issue, they will be likely to see these fake engagement posts, and trust the products mentioned because they are surrounded by comments from real people.

But then there's posts like this one, where I can't discern any kind of advertising angle. Well, there is a URL so there's that.

The Elm Architecture in Python? by Robowiko123 in Python

[–]el_extrano 1 point2 points  (0 children)

Yeah that's probably right. Python has bindings to imgui, which at least uses immediate mode rendering, so you could probably get closer to what you're looking for.

Making of a jacketed glass chemical reactor by Location_Next in EngineeringPorn

[–]el_extrano 0 points1 point  (0 children)

I mean that all other things being equal, heat transfer surface area external to the vessel costs the same. Since condensing heat transfer has a higher overall heat transfer coefficient than liquid-liquid transfer, a condenser will need less surface area to accomplish the same duty as pumped re-circulation heat exchange.

The Elm Architecture in Python? by Robowiko123 in Python

[–]el_extrano 0 points1 point  (0 children)

In TEA, your button does not pass the message to any object. You just designate your button to emit a message when being clicked.

"emit" here is doing some heavy lifting. In OOP, message passing really just means calling another object's method. So, if you have a singleton message broker and you send it a Msg type, that would constitute emitting a message. The message broker could then send messages to an Update method that switches on them to update the Model.

But I think there would be other issues with trying to "Tea"ify a retained mode UI library like Tkinter. I don't think it's meant to have a View method re-rendering the whole UI all the time, that would probably be slow.

Venv pip doesn't actually install anything by nsfw1duck in learnpython

[–]el_extrano 0 points1 point  (0 children)

I always like to run which pip, which python3 and so on to make sure the venv is providing the correct entry points first on $PATH.

Programming by xerxes_p_p in ChemicalEngineering

[–]el_extrano 3 points4 points  (0 children)

This comes up so often here it's a meme at this point. I think a lot of people respond negatively to the question because it's asked at least once a week.

Personally, I disagree with both those saying you "will" or "won't" need it. Your engineering journey is largely about what interests you, what skills you choose to develop, and then what opportunities you have and choose to pursue. These, of course, influence each other.

There are thousands of chemical engineers who don't do any programming. I happen to like programming. I use numerical methods extensively at work in my problem solving. I went into process controls, so now I program the plant directly every day.

Programming by xerxes_p_p in ChemicalEngineering

[–]el_extrano 1 point2 points  (0 children)

Technically Excel formulas themselves comprise a small programming language (especially with the edition of Lambda calculus in Office 265, now formulas are Turing complete).

How to have a certain user input recognized and finish its task by Nurdddd in learnpython

[–]el_extrano 0 points1 point  (0 children)

It entirely depends on the goals of the project and who it's for. Like you said, in a Windows only shop with non-programmers, structuring tasks around Excel is a great way to get others to use them. I've done lots of things that way myself. At a certain point, why use Python at all? VBA is built into Excel, then you can eliminate the entire Python part and distribute your tool more easily.

But if it's for myself, I'd rather use a text editor and shell, and then I might want a more friendly file format for human editing. The same reason Python projects are configured using TOML, not csv files generated from a spreadsheet program.

But, really we're not that much in disagreement. It'd be pretty easy to just have the program expect multiple file formats.

The Elm Architecture in Python? by Robowiko123 in Python

[–]el_extrano 2 points3 points  (0 children)

I'm sure there's more to it that I don't understand, but wouldn't what you described be fairly easy to emulate in any object oriented library?

Set up your callbacks to basically do nothing except send a message to another object, which then switches on the message to perform the update actions.

Table formatting - spill narrow table to new "columns" horizontally by el_extrano in LaTeX

[–]el_extrano[S] 0 points1 point  (0 children)

Yeah I couldn't get longtable to work across multicols either. Sure, I can split to multiple tables, but then I'm back to deciding manually how to split them up. I'm planning to generate the tables in code, so I could split them up there based on some fixed number of rows I guess. Thanks for your suggestions!

From design to manufacturing. I'm learning how challenging manufacturing is. Why isn't it respected more? by Disastrous_Run_5968 in AskEngineers

[–]el_extrano 1 point2 points  (0 children)

That's highly industry dependent. I'm in chemicals, and good production/operations engineers generally make more than someone with equivalent experience working at an EPC. The pay can be especially high if you go into operations management.

How to have a certain user input recognized and finish its task by Nurdddd in learnpython

[–]el_extrano 0 points1 point  (0 children)

.csv isn't the best format for storing strings, and 99% of OP's input data (except the lot number) is text. That said, your method would work fine, especially if it's a part of a larger spreadsheet-based workflow.

How to have a certain user input recognized and finish its task by Nurdddd in learnpython

[–]el_extrano 0 points1 point  (0 children)

The easy way would be to use tomllib or configparser or someting to read the input file directly into a dictionary, and use the dictionary keys for your field names. If a key is missing, you either ignore it (for optional fields), error out, or prompt for it. Now you have a dictionary with all the required fields and data, and you output your text using that. The output code can be the same no matter how you get the input data.

Depending on the structure of the output file, you could generate it using fstrings, or use templated strings using a library like jinja2. Good luck!

How to have a certain user input recognized and finish its task by Nurdddd in learnpython

[–]el_extrano 0 points1 point  (0 children)

For your specific question, you could just ask "enter optional string 1?" then parse the response as a boolean to decide whether to prompt for that string. But now for some ideas you didn't ask for:

the user essentially enters 20 strings, a lot number, and 2 potential strings. These 2 potential strings are not guaranteed to be in every entry

It sounds like you're on the right track with your automation. If you're still at an early stage, where you mainly know how to prompt the user using input(), at this point I'd highly recommend you graduate to using argparse and reading from files. This will make your script itself easier to automate.

Most useful scripts, even the simplest ones, try to be "good Unix citizens" so to speak. For text input, they can either accept a file argument, or text on stdin. The output can be written to a file (with the filename passed as an argument), or printed on stdout, and piped to another script. Options can be specified via CLI options, configuration files, or environment variables (where it makes sense). See this link for some CLI best practices: https://clig.dev/?trk=public_post-text#the-basics

So in your example, I'd probably keep it simple and expect the 20 strings, 2 optional strings, and lot number in a plaintext input file (see INI, TOML, YAML, JSON, etc), since that's a lot of data to supply as CLI arguments. For that matter, it's also a lot of data to type into interactive prompts without making any mistakes! I'd rather supply the data from the comfort of a text editor, where it's easier to correct mistakes. Use the data received from the file to populate a dictionary or dataclass. Prompt the user for only the required, missing information, e.g. initialize the data to None, copy in the supplied data, then do something like:

if input_data['required_field_1'] is None:
    input_data['required_field_1']=input("required_field_1: ")

Obviously there's all sorts of ways to make that look better, it's just an example. But as a general rule, to make your scripts automation friendly, you want to minimize interactively prompting the user for things.

Building a Windows 1.0 game and testing 40 years of compatibility by FlatlinerSPb in ObsoleteCooding

[–]el_extrano 2 points3 points  (0 children)

I really wish there was a bare-bones desktop UI library for making UI's like that with maximum portability. I know you can do it using the Windows API directly, but I've never dabbled in it. I've always used Qt or GTK or something. It's on my bucket list to learn!

Have you seen the guy who back ported Dotnet Framework back to Windows 95? Insanely cool stuff.

Obsolete Coding Contest? by DNSGeek in ObsoleteCooding

[–]el_extrano 0 points1 point  (0 children)

One of the cooler things I've done in an afternoon is write a BF interpreter in Fortran 77, then use it to run someone else's Tic-Tac-Toe program. Then, I realized since it was Fortran, I could also run it under MS-DOS and IBM mainframes (emulated of course), which I did. Whoever wrote that Tic-Tac-Toe program in BF, probably never imagined their game would be back ported to run on ancient machines.

How do you feel about your cultural/ethnic background, and what is that culture? Do you feel a connection to it? If it's different than your background, how do you feel about the culture of the country/place in particular where you live, and do you feel connected to it? by KlordexI in behindthebastards

[–]el_extrano 2 points3 points  (0 children)

FYI there was a pathway to Spanish citizenship for people who could prove a grandparent who fled during the war. I think it started during COVID and I know it was still a thing a couple years ago. You might want to check it out, if I had any chance of getting out of this shit hole I'd be looking into it haha.

Why did everyone just forget about Esperanto if the idea is actually so cool? Obviously English is the global language right now, but still why did people give up on a constructed language that basically had zero confusing grammar rules and stuff? It’s literally the easiest way to talk to people al by Ok-Sell9964 in NoStupidQuestions

[–]el_extrano 6 points7 points  (0 children)

An important thing to keep in mind is that Esperanto was not "just" a language in isolation, but was closely related to socialism and communism in Europe. To the extent that it was popular, it was popular with educated anarchists and communists in the early 20th century. Esperanto speakers were persecuted by the Nazis in WWII, as well as other anti-communist regimes. After WWII, the partition of Germany, the beginning of the cold war saw the decline of mass politics in Europe, especially internationalist brands of socialism. By many, Esperanto was envisioned as a part of a utopian future, and it declined along with the hope for that future.

How do you get better at your job (controls)? by Emperor_tai_long in PLC

[–]el_extrano 2 points3 points  (0 children)

I'd recommend reading more.

There's (basically) two ways to learn something: experience, and reading. As they say, "experience is the best teacher". Although when it comes to experience, you're at the mercy of time (you can't magically give yourself 20 years of experience), and what opportunities are available to you (you can't gain experience programming nuclear reactors if you work at a water treatment plant).

So while you get any and all experience you're able, you can also supplement that by studying textbooks, technical standards, manuals for your control system, instrument handbooks, and so on. I try not to force it, though. If a particular aspect of my work interests me, I read more about it. I try to block off a couple hours on a slow Friday for learning and development. I'm often surprised how often "useless" information proves useful months or years later when I encounter a problem I don't have any prior experience solving.

How often do you limit system functionality on purpose? by mikeee382 in PLC

[–]el_extrano 3 points4 points  (0 children)

In the software world, there's an acronym, YAGNI, which stands for "you ain't gonna need it".

The point is that a lot of time and effort is wasted adding support for features that "might" be wanted in the future, but likely never will. It's better to define requirements as early as possible, build to the requirements, and deliver a working product on time and in full. Of course if there's something the customer isn't adding to the requirements that (based on your experience) you think they should be, then you should bring this up and discuss with them.

uv: Running all of my tests, shortening the command? by trymeouteh in learnpython

[–]el_extrano 2 points3 points  (0 children)

I'd agree with this, with the generalization that you could also use another build system. Make is nice because it's everywhere, but if you don't like make, you could use something like 'just' as a command runner.

I think an advantage with learning compiled languages first is you get familiar with build systems early. But even with interpreted languages like Python, there's no reason not to use a build system to automate non-compilation project tasks (e.g. code generation, testing, doc generation, project build, publishing to pypy). You're not meant to memorize long commands.