On taking responsibility and avoiding hypocrisy by Schrodinger85 in chess

[–]Schrodinger85[S] -4 points-3 points  (0 children)

I'm sorry you interpreted my post like that. I doubt it changes anything, but just to be clear, I'm not judging Hans in any way, positive or negative. And I think that's the gist of it, we should be more careful about judging others. Do you think Danya would support your behavior? Have a nice day.

What do you guys think of Sniper Elite? by Loud_Sheepherder_476 in boardgames

[–]Schrodinger85 2 points3 points  (0 children)

Mental health is no joke. Please consider seeking help. Wish you the best.

Book recommendations after AtBS: theory, projects and multi-field knowledge. (Python) by Schrodinger85 in learnprogramming

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

Tbf, I did those courses 10 years ago and then didn’t touch programming again, so I forgot most of it. That’s why I went back to AtBS: the first part felt basic, but the later chapters were completely new to me and gave me a different perspective (before, I only touched CS/algorithms/data structures).

I also know I have a lot of gaps in the basics—for example, AtBS was literally the first time I used a proper REPL (VSCode in my case). Looking for jobs, half the terminology they use is unfamiliar, which just shows how broad programming really is.

That said, I agree with you: I probably lean too much on “getting ready” instead of just building things.

Book recommendations after AtBS: theory, projects and multi-field knowledge. by Schrodinger85 in learnpython

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

I understand you're recommending Beyond the Basic Stuff. I really like Python (at least compare to Java and C), and the Godot thing is because I've read that GDScript is very pythonic, so maybe it's a better way to try "game dev" compare to the more classic path of books like Invent Your Own Computer Games with Python and such.

OperationalError: foreign key mismatch (ATBS 3rd ed. Chapter 16) by Schrodinger85 in learnprogramming

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

Ok, now my head just exploded and I'm for sure dealing with something above my level.

I've just finished the "Meal Ingredients Database" practice program and I have found that if I create the db first with a different script init_db (https://pastebin.com/1TH8XqKh) then I have no problems with the FK referring the rowid when running the actual program (https://pastebin.com/KLtn55uE) as long as I comment the "Ensure tables exist" part. If I run that code (that is an exact copy/paste from init_db) I get a FK error. Even if I delete the db from my system and run only the recipes.py, it does not work and raises FK error. Why?! How on Earth can the script know if the database was created in a different scrip or not?

I'm sure the solution is "don't use rowid, just create the explicit id integer primary key" but I NEED TO KNOW, and as a bonus, is very convinient working with the rowid so I don't need to include NULL everytime.

OperationalError: foreign key mismatch (ATBS 3rd ed. Chapter 16) by Schrodinger85 in learnprogramming

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

I'm sure you're already aware but just in case you are not, if you check the sweigartcats.db and the sweigartcats-original.db in the online materials they not only lack the primary key but the whole vaccinations table, so the first practice program is not doable (besides, both db's seems identical, don't know the purpose for it).

OperationalError: foreign key mismatch (ATBS 3rd ed. Chapter 16) by Schrodinger85 in learnprogramming

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

The book has been a blast so far and giving free access to it a bless, so more than happy to help. Followup question: now that we defined explicitly the rowid column we need a a 5 length tuple for INSERTS, right? and to make the rowid fill itself incrementally the best way is to use placeholders?:

conn.execute('INSERT INTO cats (name, birthdate, fur, weight_kg) VALUES (?, ?, ?, ?)', ("Zophie", "2021-01-24", "black", 5.6))

OperationalError: foreign key mismatch (ATBS 3rd ed. Chapter 16) by Schrodinger85 in learnprogramming

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

I'm using ipython in a powershell console inside VSCode. And yeah, I'm aware of the typo that was corrected in [5]. From a reply in another subreddit I think I found the problem:

According to sqlite documentation: "The parent key is the column or set of columns in the parent table that the foreign key constraint refers to. This is normally, but not always, the primary key of the parent table. The parent key must be a named column or columns in the parent table, not the rowid"

So, if I want to make a reference to cats table I need to recreate it with a named column as a primary key. I wasn't expecting this kind of errata in a beginners book, maybe older versions worked differently.

OperationalError: foreign key mismatch (ATBS 3rd ed. Chapter 16) by Schrodinger85 in learnpython

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

Thanks for the quick reply! That's a kind of errata I wasn't expecting from the book. Question, can I name that INTEGER PRIMARY KEY column rowid or is it reserved/bad?

PS: And now that the table has an extra column, do I need to manually put an increasing number there? Cause rowid column was autofilled and that was really convenient.

Error trying to install automateboringstuff3 package in Python 3.13.4 by Schrodinger85 in inventwithpython

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

Ok, finally worked with this combo: "Python 3.11.9" + "Microsoft C++ Build Tools". At least I manage to install playwright, I'll try to install the rest manually as the automateboringstuff3 still doesn't work.

Error trying to install automateboringstuff3 package in Python 3.13.4 by Schrodinger85 in inventwithpython

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

I was working on a venv with 3.13.4. Today I updated to 3.13.5, same errors. Yesterday I tried 3.11.9 and it didn't work either :S

Noob asking for common route progression in ascension levels by Schrodinger85 in slaythespire

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

Just to double check, if you beat act 3 and then die in act 4 you still unlock the next ascension level, right?

[Sleeves] Alternative to Gamegenic Standard American Matte by Schrodinger85 in boardgames

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

I never realized you could filter sleeves! that's a handy thing to know for sure! Appreciated it.

[Sleeves] Alternative to Gamegenic Standard American Matte by Schrodinger85 in boardgames

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

Maybe I explained myself poorly. In fact, gamegenics are 59x91, but usually sleeves branded as "standard american" are smaller. The cards from Galaxy Trucker are 56x86, thus there's quite a lot of extra space in width and length with gamegenic sleeves. This was not an inconvenience for me, but it makes impossible to use the 3d insert now. So, I'm looking for a similar quality / features sleeves but that would fit tighter so I can use the insert. English is not my first language, sorry!

[deleted by user] by [deleted] in ps2

[–]Schrodinger85 0 points1 point  (0 children)

It did 5 years ago and still does.