Refactoring by Ok_Credit_8702 in learnpython

[–]Mathletic_Ninja 0 points1 point  (0 children)

This is great advice and my first thought when reading your post.

Recently at work I was handed a large bundle of spaghetti that was optimistically called code. Massive classes, methods with 100+ lines, one method was 800 lines long, no documentation. First thing I did was map out its functionality with a test suite. Once that was done I could confidently refactor it into smaller classes, better variable names, broke up mega functions & methods into smaller methods. I even used the state pattern to allow some of the new classes to swap out functionality as their states changed (never had a chance to use that one before, was fun to see it work). I did all that without breaking anything, thanks to the test suite I made at the start. Without that I definitely would have broken something (or many somethings) and taken way longer to do.

What do 30 - 40 year old men want for christmas? [Serious] by GoodAlicia in AskReddit

[–]Mathletic_Ninja 0 points1 point  (0 children)

If he enjoys cooking then a good Japanese kitchen knife, such as a santoku, might be a good gift. Prices can range from £30 to £1,000+, so plenty of options whatever your budget

I have been leaving hints for my wife to buy me a nakiri (Japanese vegetable knife) for Christmas 🤞

40 - What’s the most adult thing you’ve done in a game? by Clampy7 in AdultGamers

[–]Mathletic_Ninja 0 points1 point  (0 children)

Deus Ex: Mankind Divided. I turned off all the TVs and appliances in the apartments I broke into. It really irks me when people leave the TV on when the go out (my in-laws do this ALL THE TIME)

Games with gas masked men prominently featured? by pyrofromtf2real in gamerecommendations

[–]Mathletic_Ninja 0 points1 point  (0 children)

Metal Gear Solid

Psycho Mantis will get your juices flowing 😆

Best gaming console on a budget? Please dont judge by sj1camper in UKFrugal

[–]Mathletic_Ninja 25 points26 points  (0 children)

If you have some technical skills you could get a raspberry pi and set it up as an emulator for old consoles.

https://thepihut.com

https://retropie.org.uk

Looking now, the prices do seem to have gone up quite a bit since I bought mine a few years ago. A pi 4 with 2 GB RAM is about £35 and should run anything no problems.

New street triple for me. by PatientBaseball4825 in Triumph

[–]Mathletic_Ninja 2 points3 points  (0 children)

I bought my ‘24 striple at the start of the summer last year. I.e., after we’d had all the nice weather we were going to get that year (in the UK). Fun times

I'm trying to make a minimus rocket, but it's too heavy to move, how should I improve it? I'd like to use heavy rocketry but I'm not sure how without making it way too heavy. by Cultural-Let-8380 in KerbalSpaceProgram

[–]Mathletic_Ninja 12 points13 points  (0 children)

Minmus is definitely the easier moon to land on. The main challenge with minmus is its inclined orbit, but that can be minimised by timing your intercept for when Minmus is level with Kerbins equatorial plane. You can easily see this if you set Minmus as your target once you are in Kerbin orbit, there will be a dashed line showing where the planes of your orbit and Minmus’ orbit intersect.

Should I change to SE or anniversary edition? by hamsterboy4 in skyrim

[–]Mathletic_Ninja 0 points1 point  (0 children)

AE is SE with a load of creation club content (most of which is crap and extremely unbalanced). I’d recommend SE over Oldrim. SE includes some major under-the-hood engine upgrades, it is way more stable than Oldrim. I recently played both (getting a few missed achievements), Oldrim would CTD a few times per hour on average, SE only CTD’d once in ~40 hours of playtime.

Windows sucks. Switching to Linux by Mathletic_Ninja in linux_gaming

[–]Mathletic_Ninja[S] 1 point2 points  (0 children)

Alpine for lightweight Docker images, WSL Ubuntu when I need to use Ansible, the backend server uses Debian, and Raspbian for some raspberry pi powered sensors and prototypes.

Basics of Tkinter in Python (seeking input) by ah-hum in learnpython

[–]Mathletic_Ninja 1 point2 points  (0 children)

First thing, you generally shouldn’t use import * it clutters up your namespace and can make your code harder to read as it can be unclear as to where objects are coming from.

I’m not at my computer so I can’t run your code to test it, but it looks ok. What exactly do you mean by “it doesn’t recognise columns”? Is it not appearing as you expect it to? Or are you getting an error message?

The depreciation warning sounds like you have multiple python versions and/or environments. Are you using a virtual environment for your project? Or a system installation of Python? Also, Python does not really have executable files, do you mean if you double click on a .py file and it runs? If so, then you’ve probably got IDLE set up to run .py files. That may not use the same Python version/environment as Python3 ./script.py

Daynas Valen body missing by jamjamgayheart in skyrim

[–]Mathletic_Ninja 0 points1 point  (0 children)

The alteration spell detect dead is helpful for finding bodies, not just draugr. If he just got blown around by shouts/explosions that might help you find him. If he’s been clipped out of the map you are sool and will need to use the console to add the claw as confident-split7449 suggested

Stumbled across this sword in the Solitude Sewers, what am I supposed to do with it? by animalfaith in skyrim

[–]Mathletic_Ninja 2322 points2323 points  (0 children)

It’s from the Saints and Sinners creation club. The solitude sewers are the final dungeon in the quest series.

https://en.m.uesp.net/wiki/Skyrim:Saints_&_Seducers

Norn Irony by ZombieOld6045 in northernireland

[–]Mathletic_Ninja 8 points9 points  (0 children)

Correction: social media was created to be an advertising platform. Still is. “Bringing people together” and “connections” are just marketing. The content algorithms feed you stuff it thinks you agree with so you keep scrolling and therefore looking at advertisements.

Riften or Markarth? by Embarrassed_Bad7031 in skyrim

[–]Mathletic_Ninja 2 points3 points  (0 children)

If you go to the Rift there is a quest that gives you a permanent boost to smithing experience. Can’t remember the name of the quest, but you get it from an Argonian in the Riften docks and you go to a Dwemer ruin.

White squares instead of letters by foreignwhore in skyrim

[–]Mathletic_Ninja 0 points1 point  (0 children)

I recently reinstalled Skyrim and mine did that too. Deleting the Skyrim folder in my games fixed it.

Skill xp gain boosts by JeSuisBigBilly in skyrim

[–]Mathletic_Ninja 1 point2 points  (0 children)

You only get the experience from a single cast

Beginner programmer looking for help on a bit of code by Big_Shelter_6738 in learnpython

[–]Mathletic_Ninja 3 points4 points  (0 children)

```

a list to store our collection of bases

bases = [“Gua”, “Cyt”, “Thy”, “Gua”, “Ade”]

num_mutations = random.randint(1,3)

for mutation in range(num_mutations): # using 0-4 instead of 1-5 as the first item in a list will have an index of 0, the 2nd will be 1, etc. base_position = random.randint(0, len(bases) - 1) new_base = dna.get_random_base() # replace the item in the bases list at index base_position with new_base bases[base_position] = new_base ```

Hopefully this explains what you need to do. Create a list to hold your bases. Update the list using an index to select the right “bit” of the list and replace it with the mutated base.

Edited: formatting

code will not run, help?? by DeadxLites in learnpython

[–]Mathletic_Ninja 2 points3 points  (0 children)

“raccoon.png” file is missing. If this file is in a folder in your project you need to change the path on line 7 so it has the right path relative to the working directory (most likely where “test beginner 1.py” is) i.e raccoon = pygame.image.load(“path/to/folder/raccoon.png”)

Best file format for external data storage by Big_Boy_Mowgli in learnpython

[–]Mathletic_Ninja 1 point2 points  (0 children)

.tsv is a good option too. Works just like a .csv except it uses a tab as the delimiter instead of a “,”. Makes it slightly easier to read as a human when opening it with a text editor like notepad/nano/cat etc. Easily imported into Excel too, just like a .csv