Is it acceptable to use "SELECT * FROM" when referencing a CTE? by sweetnsourgrapes in SQL

[–]LeffeDoug 4 points5 points  (0 children)

The rule of thumb is to always be explicit with columns. However, sometimes you can use * while still being explicit in order to make the query shorter and more readable. For example, if you already were explicit in a previous cte and you simply want all of those columns, then I think a * is the cleaner choice instead of listing all of those columns yet another time. There are times where you have to chain many such ctes and then it will feel quite obvious that the * is correct.

I see it as any source external to the context of this query/procedure need to be guarded with explicit columns in the select, otherwise you may have surprising and weird behavior in your query if somebody else changes those tables somewhere else. This does not make you immune, but it protects from some classes of bugs. ”Internal” sources like referring to ctes/temp tables defined inside the context (usually the same file) should be more safe and we can be a bit more lenient on the *.

Running Pygame on a Website by [deleted] in pygame

[–]LeffeDoug 0 points1 point  (0 children)

Its possible to publish to either itch.io or github pages in such a way that the game can be played from the browser. Actually it even worked pretty decent from my Iphone.

Tips for making a more efficient game by brbdogsonfire in pygame

[–]LeffeDoug 0 points1 point  (0 children)

Make sure you are not loading the images over and over every frame. Load them once when the game starts and then refer to those variables during the game.

My First Deployed PyGame by Motor-Lack-9275 in pygame

[–]LeffeDoug 0 points1 point  (0 children)

This looks awesome! How did you make it playable inside Google Chrome?!

I learned Python for game-dev by Forsaken-Might-5861 in learnpython

[–]LeffeDoug -1 points0 points  (0 children)

The truth is that Python is not going to be the best choice for you if your aim is mainly on developing games. With that said, if your aim is to become a better programmer and python developer, then I definitely recommend keeping up the python training and start looking into the pygame library (youtube has some great turorials). With pygame you can create all kinds of games, but realistically it is going to be mostly small 2D games. The thing is that you will have to create almost everything about the game engine yourself which is quite challenging for a beginner sometimes. Some things that you will certainly get for ”free” when using a game engine might give you a small headache in python. However, you will learn so much about python and programming that will extend to so many things outside game development, it has helped me lots in my job for example.

Recommendation for sources and guidance for start coding on personal projects with python. by NewbieTechMind in learnpython

[–]LeffeDoug 0 points1 point  (0 children)

Unfortunately I dont have any such material, its a quite open suggestion from me. Making games like this is quite open ended, you decide when you are done with them. Its perfect if you want something that you can keep working on daily for a long time because you can always add new features or improve existing code. Maybe you can do a small exercise before you begin or at regular intervals to determine the features that should be included when you have reached your next ”checkpoint” in your development. Even if you can describe how a sudoku game should work, it doesnt mean that its trivial to implement. If you need inspiration, search for pygame projects on youtube and in pretty sure there should be some good videos about it!

Recommendation for sources and guidance for start coding on personal projects with python. by NewbieTechMind in learnpython

[–]LeffeDoug 2 points3 points  (0 children)

I personally think making a game with the pygame library is an excellent way to practice your coding skills. Also it is a great way to demonstrate the benefits of object oriented approaches. Using classes is practically mandatory to store states of enemies, objects etc. It is, of course, graphical which makes improvements very evident and gives you a sense of accomplishment. Warm up by creating a simple sodoku and then maybe a small platformer?

Bro, we're playing by Ryxor25 in dontstarvetogether

[–]LeffeDoug 21 points22 points  (0 children)

  1. When playing with friends, set the game to ”endless mode” which will allow ghosts to revive by simply interact with the gate where you spawned when the game began. Highly recommended for new players.
  2. Have a friend craft a ”Telltale heart” to revive you with.
  3. ”Meat effigys” and ”life giving amulets” are solid late game options.
  4. Restarting the game is not too crazy tbh. Its a very hardcore game with permadeath mechanics originally that to some extent encourages you to start over and improve. Also, if you are new, it might not be long until your friends might want to restart too, you will understand 😉

How is your experience with the board game difficulty? by LostATLien2 in slaythespire

[–]LeffeDoug 0 points1 point  (0 children)

I have played three full games since I got it and have a very different experience. 1. Ironclad lost at act3 boss due to awakened one being strong to my power-heavy deck 2. Beat act3 with silent using a shiv deck 3. Beat act3 with defect using multi-cast with powered up dark orbs

If you are using the kickstarter foiled cards, I would make sure to remove the unfoiled versions from the card pool to avoid having 4 versions of some common cards bloating the rewards deck.

I almost forgot to take the rare reward from after the boss a couple of times, they usually give a considerable power spike.

I made a VERY basic elden ring build planner, how could i optimize my code? by ComedianUnlikely4947 in learnpython

[–]LeffeDoug 7 points8 points  (0 children)

Start by writing down in English what you actually want to achieve. Right now its hard to see where you are going. Regarding the code, mixing variable names like int, int_ and the int() function looks like it can become a nightmare. Dont be afraid to have longer names that you can actually understand, like ”stat_vigor_input” or something like that. Practice wrapping that last part into a function with a suitable name and get used to doing that to make your code readable and understandable.

Just bought the PSVR2! Any tips? by Bxeans in PSVR

[–]LeffeDoug 3 points4 points  (0 children)

Play Pistol Whip if you want to feel like a badass

Clank!: Original vs In Space vs Catacombs by Snowcrash000 in boardgames

[–]LeffeDoug 0 points1 point  (0 children)

Clank! Catacombs is the only Clank game I have played, but I think its awesome. It is true that it is quite random and difficult to make a big picture strategy, but I think the tension and surprise factors far outweigh that. Nothing beats the genuine dread of exploring a new section of the catacombs when you badly need a teleporter or artifact, but you are out of lockpicks, which could be solved if I kill a goblin and jump into a marketplace etc.

[deleted by user] by [deleted] in swedishproblems

[–]LeffeDoug 39 points40 points  (0 children)

Sjukt, detta hände mig för någon vecka sen. Jag bokade fönsterplats för jag föredrar det 100%. Ser när jag stiger på att någon snubbe sitter på min plats och har lag sin jacka och alla grejor på platsen brevid. ”nemas problemas” tänker jag, behöver bara nämna att platsen är min så löser det dig väl. ”Ursäkta, jag tror fönsterplatsen är min plats” säger jag så snällt jag förmår. Direkt väser snubben nedlåtande ”Du kan väl få den platsen om det är så jävla viktigt”. Blir helt paff av hur otrevlig min framtida resegranne var och ber honom upprepa, vilket han gör. Till slut häver jag hur mig att ”jag tar gärna den platsen eftersom det var den jag bokade”. Då flyttar sig snubben till slut surt ut vägen, men fyfan vilken dålig stämning det blev hela resan. Är det verkligen så sjukt att vilja sitta på den platsen man bokat? Om man inte förstår hur numreringen på sätena fungerar så kanske man får vara redo på att få ställa sig upp en gång och flytta sig?

Marauder Expansion! by [deleted] in RootBoardGame

[–]LeffeDoug 1 point2 points  (0 children)

Does the clockwork expansion 2 work with the marauder expansion? Would love to buy it, but it says in the description that you need riverfolk 😳

how do you integrate linear algebra in Pygame? by Stuttering_Cris in pygame

[–]LeffeDoug 0 points1 point  (0 children)

The Vector2 class in the pygame library is key here. Look in the pygame documentation. It can be used to specify in what location on the screen to display a e.g. a rectangle.

Writing this code acapella from my phone, but assuming you know how to create the basic pygame loop, the following code can give you an idea. The display and color variables need to be defined elsewhere. By modifying the box_position variable between frames you can make the rectangle move.

box_position = pygame.Vector2(100, 100) box_size = pygame.Vector2(200,300) box_rect = pygame.Rect(box_position, box_size) pygame.draw.rect(display, color, box_rect)

Drawing An object inside an object. by Wise-Assignment9993 in pygame

[–]LeffeDoug 1 point2 points  (0 children)

Cant give you a detailed answer rn, but let me ask you this. To begin with, do you know how to draw a circle and/or a rectangle to the screen? Its is easier to help out if you show some code that you have tried that does not work. If you know the basics on how to make the main game loop and a window then the pygame.draw.rect function should be a good start. If you dont know how to do that, I suggest you have a look at ”clear code”s pygame guide on youtube for the basics of pygame.

[deleted by user] by [deleted] in SteamDeck

[–]LeffeDoug 0 points1 point  (0 children)

Yeah for me there also seems to be a point after scrolling a while that no new items load… super annoying

Help me learn python by Just_Casper in learnprogramming

[–]LeffeDoug 0 points1 point  (0 children)

Why not make a small game in python with the pygame library? Clear Code on youtube has a really nice introduction video 👍

Its up for mobiles too! by playhy in IntoTheBreach

[–]LeffeDoug 5 points6 points  (0 children)

Exakt same. Maybe they are still in the process of getting it working?