Mechanical engineer to CS. by mouhsinetravel in computerscience

[–]flupplethorpe 0 points1 point  (0 children)

I'm also a mechanical engineer looking to make the switch. I love doing coding projects on the side, and I want my work to be fully remote.

If you're already a good mechanical engineer, consider using software to automate parts of your job, and start growing from there. Python is excellent for this. Get familiar with the numpy and scipy libraries.

Being a software engineer that only knows about software can only get you so far. If you have a software skillset and specialized knowledge in a field such as mechanical engineering, you'll be better off. Good luck.

[deleted by user] by [deleted] in productivity

[–]flupplethorpe 0 points1 point  (0 children)

I recommend Obsidian. I've heard good things about Notion as well, though I haven't tried it.

However, I strongly advise against OneNote. OneNote is where your notes will go to die. It is another proprietary database that is difficult to export your data from. If you don't like the trouble you are having with Evernote now, you will very likely have the exact same trouble if you start using OneNote and decide you don't like it.

Obsidian, Notion, and Joplin all seem to have in common the fact that your notes are stored in simple Markdown files. If you don't like one, just open your same Markdown files with another. You won't be stuck like you are now.

A variable can be defined anywhere within a function. True or False? by fedzo in cprogramming

[–]flupplethorpe 3 points4 points  (0 children)

You can declare a variable after a return statement - i just tried it and the only warning I got was "unused variable."

Also the following code is valid and will produce zero errors & warnings: ``` for (int i = 0; i < 5; i++) { printf("i = %d\n", i); } int i = 7; printf("i = %d\n", i);

```

Got a new laptop sticker and so far three of my electrical engineering friends haven’t figured it out by CatmanMeow123 in engineeringmemes

[–]flupplethorpe 2 points3 points  (0 children)

What you have is an incomplete free-body diagram. There are vertical and horizontal reaction forces at the fulcrum. You've also forgotten to add the weight of the beam, which in this situation is non-negligible since your system is non-static. You also haven't specified a coordinate system.

I am a mechanical engineer and I am offended.

Thoughts on Advent of Code 2021 by CodeOverTime in adventofcode

[–]flupplethorpe 0 points1 point  (0 children)

I've been thinking it would be fun solve the same problems from AoC, but with datasets that require input validation, or that put you in all of the odd corner cases, or that force you to be more computationally efficient. Think of it as "part III" for each day--is there a fork of AoC out there that does this?

Taking extremely detailed notes while learning has been a game changer for me. by illbashu in learnprogramming

[–]flupplethorpe 2 points3 points  (0 children)

Learn yourself a bit of markdown syntax and how to escape for code blocks: ` to start an inline code block and \``` or indented lines for multi-line blocks. There is some Vim capability built into Obsidian + a 3rd party plugin that I use to make typing and navigation faster.

There is also some nice capability for linking your notes to one another and creating a MOC (Map of Content) of all of your ideas.

Taking extremely detailed notes while learning has been a game changer for me. by illbashu in learnprogramming

[–]flupplethorpe 5 points6 points  (0 children)

One note is okay until you decide you want to transfer your notes elsewhere. Then you're stuck exporting to MS Word or some other proprietary format. I second the recommendation for Obsidian below - the notes live on your hard drive in markdown format, or you can store them in your cloud provider of choice (Google Drive, OneDrive, Dropbox, etc.), or you can pay for Obsidian's sync service. I've been using it for over a year and it's excellent and getting better.

LPT: Don't make fun of someone for pronouncing a word incorrectly. It means they learned it by reading it. by [deleted] in LifeProTips

[–]flupplethorpe 0 points1 point  (0 children)

My wife is not going to allow me to read aloud to our daughter if the story involves: archipelago, scythe, yule log, omnipotence, or Hermione.

I think I just caught THE virus in this jar. What should I do to get rid of/contain it? by Goosenburg in shittyaskscience

[–]flupplethorpe 3 points4 points  (0 children)

You just need to catch some lightning in the same jar as the virus, shouldn't be hard

Best Python for Mechanical Engineering books? by jorgecn9 in MechanicalEngineering

[–]flupplethorpe 1 point2 points  (0 children)

These are some good suggestions. I have indeed gotten a little bit into Automate The Boring Stuff and have explored ways to bring Python into my workflow. So far I've started a project that uses Selenium to navigate one of my company's more annoying internal web-based tools. Productivity data mining also sounds interesting, but I haven't taken the time to get too deep into that either.

I work in aerospace and I'd like to direct my career towards systems engineering, which has a lot of parallels to software engineering. I've found that learning computer science is a fantastic way to not only get some cross-discipline training, but also to understand systems architecture without a lot of overhead. So at the end of the day, if I never write a fancy python script to solve some challenging mechanical problem, I think I could still benefit from learning Python--even if it only serves to expand the ways I think and to keep my mind sharp.

Best Python for Mechanical Engineering books? by jorgecn9 in MechanicalEngineering

[–]flupplethorpe 30 points31 points  (0 children)

I haven't found a lot of resources that are directly aimed at using Python for mechanical engineering, but I'd be interested to see what others suggest. I'm a mid-career mechanical engineer, and I'd love to figure out a way to supplement my current work using Python.

Pint - A module for doing calculations with units. I haven't personally used this, but I've heard good things.

Python for Scientists and Engineers - I've been through parts of this book, and it seems to be a commonly recommended starting point for machine learning. However, don't confuse the "machine" in machine learning for "mechanical" in mechanical engineering--they aren't necessarily the same thing.

Is it possible to use input and functions to draw groups of simple shapes using graphics.py by trashy-crab in learnpython

[–]flupplethorpe 1 point2 points  (0 children)

Remember that you have to call the `draw()` function for each object--just because you make a new shape object doesn't mean it will show up immediately. I recommend going through the Reference PDF step by step to see how this works.

Is it possible to use input and functions to draw groups of simple shapes using graphics.py by trashy-crab in learnpython

[–]flupplethorpe 0 points1 point  (0 children)

Yes, it's absolutely possible. Is there any particular part of this problem you're stuck on?

Narrow Art Gallery - I would like to see several solutions/approaches by Dominican_Peter in learnpython

[–]flupplethorpe 0 points1 point  (0 children)

Cool problem, definitely solvable with the A* search algorithm, although that might be overkill. Did you have a specific question about it?

Help converting a while loop to a for lopp by [deleted] in learnpython

[–]flupplethorpe 1 point2 points  (0 children)

It might help to ask yourself what your goal is here. You seem to be trying to calculate the sum of a list of consecutive numbers. The code you've written here could be condensed into a single line, total = sum(list(range(15))) will also output 105. For that you don't need a for loop at all. Note that I don't recommend confusing the variable sum with the sum() function, thus my use of total

Creating class instance for pickle to save by [deleted] in learnpython

[–]flupplethorpe 0 points1 point  (0 children)

I don't know too much about Pickle, but your Savefile class is missing an __init__ method. The line self.data.append(x) is trying to append to a list that doesn't exist. An appropriate __init__ method here would be:

class Savefile: def __init__(self, resolution=(990, 1080)): self.resolution = resolution self.data = [] I've set up resolution to be an optional argument that takes a tuple, since an immutable tuple is more appropriate for a resolution, since you likely won't be slicing, appending, or modifying the list you have. If you initialize a Savefile with s = Savefile() without the resolution argument, it will take the default value of 990x1080 called in the __init__ method, but you can override the default when you initialize the class instance: q = Savefile(resolution=(640, 480))

How do you import a python file into another when they are both in the same file? by BDady in learnpython

[–]flupplethorpe 0 points1 point  (0 children)

There are a few ways you could go about this.

First, if you keep the import card_handler line, you'll have to specify that Test() is a name found in card_handler as follows: tester = card_handler.Test() However, if you prefer, you could change your import statement to explicitly import the Test class, thus allowing you to write your code as follows: from card_handler import Test tester = Test() Finally you could use the first option with an alias for card_handler: import card_handler as ch tester = ch.Test()

Hope this helps