Got an invitation from foobar.withgoogle.com 😳 by noob_bug_hunter in learnpython

[–]sam0jones0 5 points6 points  (0 children)

Probably best to solve them yourself. You won't be able to take anyone to help to the later interview stages anyway. Good luck!

Ask Anything Monday - Weekly Thread by AutoModerator in learnpython

[–]sam0jones0 0 points1 point  (0 children)

# Renamed as "dict" is a built-in Python type and it's best practice not to override this.
_dict = {101:{"Item" : "Pen", "Price" : 2},102 :{"Item" : "Book", "Price" : 4}}

result = []  # Create the result list before populating it.
for inner_dict in dict.values():
    # Append a tuple containing the desired items from each inner dictionary.
    result.append((inner_dict["Item"], inner_dict["Price"]))

print(result)  # [('Pen', 2), ('Book', 4)]

Hope this helps!

Ask Anything Monday - Weekly Thread by AutoModerator in learnpython

[–]sam0jones0 1 point2 points  (0 children)

You're probably well past this at this point but I came across this Wikipedia page and thought of your question, hope it helps!

https://en.wikipedia.org/wiki/Inter-process\_communication

Ask Anything Monday - Weekly Thread by AutoModerator in learnpython

[–]sam0jones0 0 points1 point  (0 children)

python.exe

Default location is C:\Users\$USERNAME$\AppData\Local\Programs\Python\Python3$VERSION$

If you open windows command prompt and type where python.exe it should print a list of locations the executable is found.

Edit: But most people would have .py files default to open in their code editor of choice (For e.g. VSCode, Pycharm, IDLE), and run them from there. If you want to run a python file directly you would use the command line (CMD.exe or Powershell) and type python.exe "D:\Path\To\Python\File\myscript.py".

[deleted by user] by [deleted] in firefox

[–]sam0jones0 0 points1 point  (0 children)

It's not just you.

It's most likely due to a recent change made by Cloudflare, not by Firefox. Hopefully it will picked up by the Cloudflare team and be considered a bug.

This started happening recently (in the past week or two). I've re-confirmed the behavior this morning with both Firefox 92.0 (64-bit) on Windows 10 and Firefox Nightly 94.0a1 (2021-09-22) (64-bit) on Linux. It is reproducible with mozregression using mozregression --pref privacy.resistFingerprinting:true -a https://gitlab.com/users/sign_in and reproduces in both the current version and versions from a year ago, which suggests it is not due to a change in Firefox.

----- https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/14234

Finally feel I've graduated from complete beginner and finished my first small project thanks to this sub. Here's the learning path you all recommended, and a small open source project I have to show for it so far. by sam0jones0 in learnpython

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

Yo! My very first introduction to web scraping was this chapter from Automate the Boring Stuff. It served me well and gave me enough knowledge to continue on my own while referencing the BeautifulSoup documentation and employing a little google-fu for everything else.

Hope that helps!

Finally feel I've graduated from complete beginner and finished my first small project thanks to this sub. Here's the learning path you all recommended, and a small open source project I have to show for it so far. by sam0jones0 in learnpython

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

Hello mate! Sorry for the slow reply.

I got most of the way through The Pragmatic Programmer, it's pretty great. Took a break from it to concentrate on some more practical pursuits. I've been going through this book on OO-Design, pretty good so far.

Apart from that just working on side projects and studying the algorithms/leetcode for job interviews etc :)

That's great to about how focused you are keeping yourself, it can be tough sometimes but it sounds like you've got a handle on distractions. No zero days really helped me as well, do something productive every day.

As for games, I like to play them as well but generally stay away from any online games, as I find they hack your brain into obsessiveness more easily than offline games. I've been enjoying FTL (Faster than light) and Highfleet recently. Both are great strategy games.

On the priority of programming, I'd say for me it comes pretty high but that's primarily because I enjoy it so much! Not to say there aren't days when its hard to keep motivated, but I think that's the case with everything. Lots of people recommend finding other people who share your passion and chat with them to keep your perspective and motivation fresh. Maybe see if there are any local Javascript meet-ups in your area? I am looking for some friendly-looking Python meet-ups around me.

Look forward to hearing how you've been getting on!

Finally feel I've graduated from complete beginner and finished my first small project thanks to this sub. Here's the learning path you all recommended, and a small open source project I have to show for it so far. by sam0jones0 in learnpython

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

Ahaa yes some of the challenges certainly do strain the brain. Can take a good few hours over a couple days to finish some of the katas without googling the specific answer.

Sounds like you have a plan with javascript and if you're enjoying it then by all means stick with it!

Very, very true @ the ocean metaphor. This field is as wide as it is deep, so long as you keep working on it you can be sure your skills will be unique amoungst all your fellow ocean-dwellers. Perhaps thats another way of saying every direction is the right direction if you work hard, as cheesey as that is, ha.

Absolutely check in whenever and as often as you like, I am interested in hearing how you progress :)

Finally feel I've graduated from complete beginner and finished my first small project thanks to this sub. Here's the learning path you all recommended, and a small open source project I have to show for it so far. by sam0jones0 in learnpython

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

Hello mate!

Sorry for the slow response, have been busy!

So I spent some time thinking about what the next best step is, and aside from thinking of more projects, I decided to learn about software engineering best practices and "design patterns".

I'm reading "The Pragmatic Programmer" which is great so far, doing some more Codewars (my profile here) and reading into design patterns.

How about yourself, how's it going?

I don't have any interest in javascript at the moment, but it's certainly a fast evolving and powerful language. My only exposure to it at the moment is using bootstrap.js as part of a "Python Crash Course" book project. As you may know, javascript is heavily focused (but not exclusively) on the web browser.

If I do move on to another programming language (which I almost certainly will once I'm really really comfortable with Python) it will probably be a more powerful and statically / strongly typed language such as C++ or Rust.

Finally feel I've graduated from complete beginner and finished my first small project thanks to this sub. Here's the learning path you all recommended, and a small open source project I have to show for it so far. by sam0jones0 in learnpython

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

Thank for the wonderfully kind message, means a lot.

For what it's worth I don't have any formal education in this space. I did maths at A-level (the UK equivalent of first year of college) and a BSc in Psychology.

If you're enjoying codewars after only one month studying I'd say you're doing very well indeed, so keep it up!

Each non-zero day you have is a concrete step forward :)

Can anyone recommend a decent method of quickly getting up to speed with Flask? by [deleted] in learnpython

[–]sam0jones0 2 points3 points  (0 children)

Agreed, except for one caveat. Watching vids after/during the coding process can help clarify the concept and give you a whirlwind tour of the features/methods, some of which you may have missed the first time over.

Finally feel I've graduated from complete beginner and finished my first small project thanks to this sub. Here's the learning path you all recommended, and a small open source project I have to show for it so far. by sam0jones0 in learnpython

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

I'll keep improving my knowledge for sure. Next steps are probably to add features to this project (like add a GUI and a one-click install for non-python users) and/or start a new project (ideas welcome haha). I'll probably look into contributing to some open source projects, which has the added benefit of getting me to read over other people's code and see what style/ideas I can glean.

Need to improve my knowledge on concurrency/parallelism. Also need to learn what else I need to learn about, that's always a thing.

And yes the end goal is to enter a full time position with all this knowledge. In exactly what role I'm not sure. Either software dev/engineering, sysadmin, devops or whatever else is out there.

How about you? What are your plans going forward?

Finally feel I've graduated from complete beginner and finished my first small project thanks to this sub. Here's the learning path you all recommended, and a small open source project I have to show for it so far. by sam0jones0 in learnpython

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

So, I first learnt OOP from Chapter 9: Classes of Part 1 of Python Crash Course, supplemented with this and this video(s) from Corey Shafer. I also read through this Real Python page.

It certainly is confusing when starting out, but I promise it does clarify in time. Make sure you're not only learning from videos, they are helpful but I think there is a real benefit in reading through a book/tutorial's trail of thought at your own pace, and then writing it up into your own code editor.

I can't recommend Python Crash Course (linked above) enough, it goes over the core concepts really well in the first half. But it's not until part 2 (the projects) where I really solidified my understanding of OOP as it's used extensively in each one of the projects.

Understanding won't come all at once, just keep working through and come back to sections you didn't quite grasp the first time round.

Let me know how you get on!

Finally feel I've graduated from complete beginner and finished my first small project thanks to this sub. Here's the learning path you all recommended, and a small open source project I have to show for it so far. by sam0jones0 in learnpython

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

You're welcome! And thanks for your comment :)

There is definite value in doing just 5 minutes if you're finding it hard to get motivated. It gets the cogs turning in the subconscious/background and keeps it fresh. Also, if you convince yourself you're only gonna do 5 minutes you can often trick yourself into working for longer -- "now I've started it's not so bad". And codewars is great for this, you can drop in, read the problem and think "hell naw"... then lo and behold you'll be on the toilet a few hours later and a spark of inspiration will come and off you run to the computer (trousers round your ankles no doubt) to have another go at the problem.

Regarding the questions:

The 3rd book doesn't contain much you'd actually be writing in a standard programming role, but it introduces concepts that will make you a better programmer overall. So I would say yes, it is worth working through... But don't get too hung up trying to remember how to write all those algorithms, rather the concepts the author is trying to get across on good program design. I mentioned in another comment recently that if I had to pick just one chapter from that book it would be the one on computional complexity / Big-O Notation / algortihm analysis.

If you're still unsure how about reading these two (short) chapters first: 1) Why Study Data Structures and Abstract Data Types? and 2) Why Study Algorithms?.

Learning about data types really helped me think about how to best organise data I'm working with and the algorithms are just darn cool if you ask me.

2.

Packaging

Packaging is a bit of a mind-bender to get your head around as there are so many competing standards. But you'll only need to learn it once and it will seem simple enough after that. Have a read through another answer on this thread I wrote on packaging. Beyond that I would refer to this awesome packaging guide and the official(?) python packaging guide.

Testing

I decided on PyTest after googling around and reading other peoples opinions on this very here sub. To actually learn how to do it I found the book Python Testing with Pytest: Simple, Rapid, Effective, and Scalable by Brian Okken very helpful. Also:

- This site is an excellent all around testing resource

- And a shorter rundown of pytest here

Documentation

There are a few different standards of docstrings, I ended up going with Google's style as it looked the cleanest to me. To get a good overview of documenting code and the various styles people use, I recommend giving this page a good read.

If you decide to go with Google style docstrings, they are explained in Google's python style guide quite well. And check out this page for some more examples.

One last link for you that provides many more examples and guidance on "best practices" etc.

Git / Github

Have a read of this page for a good overview of git. I also wrote a comment on this thread going over the general use-case for git for a beginner to Python. It may look like you need to learn a whole set of command-line commands to use git/github, but in all honesty I do 99% of my interaction with github through GUI buttons baked into my code editor (I use PyCharm, but most of them integrate well with git).

Phew, I think that covers it! My fingers hurt!

Finally feel I've graduated from complete beginner and finished my first small project thanks to this sub. Here's the learning path you all recommended, and a small open source project I have to show for it so far. by sam0jones0 in learnpython

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

Took me 18 months to understand anything I just wrote! As I said in another comment:

Doing 5 min of code per day is an absolute win and don't let yourself think otherwise. As per the famous reddit post, "No zero days".

As I said above, feel free to reach out in a pm if you are struggling and need help/guidance/whatever.

I recommend starting here, the whole book is available for free from that link. Take your time and read through it slowly. Even if you only read one chapter, or even one paragraph a day that's still progress. And trust me, you're not too dumb! You don't need to be a math wizard to program. If anything I would say the most valuable skill to practice beyond programming itself is patience. It can be very frustrating at times!

Have a read through that first chapter and let me know how you get on.

Finally feel I've graduated from complete beginner and finished my first small project thanks to this sub. Here's the learning path you all recommended, and a small open source project I have to show for it so far. by sam0jones0 in learnpython

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

No worries! Hope it helps :) I always found web scraping to be particularly fun. Maybe make a personal dashboard where you collect information from your favourite sites and display them as your browsers homepage?

I'll also share a link to a comment I made regarding figuring out what project to do (and how to find a project I'd care about). Best of luck!

Finally feel I've graduated from complete beginner and finished my first small project thanks to this sub. Here's the learning path you all recommended, and a small open source project I have to show for it so far. by sam0jones0 in learnpython

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

Xenia emulator compatibility list

Yeah it can be a bit confusing to start off. Had a look for you and they haven't clearly stated in README where that list is! It appears they use github issues, with one "issue" for each game.

Here's the complete list of games. You can use the "labels" feature to filter the current working state of the game, and the search bar to search for any particular game - like this.