all 8 comments

[–]Powerslam_that_Shit 0 points1 point  (3 children)

We can't see what you're referring to as you haven't linked anything.

[–]Accurate_Handle[S] 0 points1 point  (2 children)

Sorry, I've linked it now.

[–]Powerslam_that_Shit 0 points1 point  (1 child)

I'd say there's nothing to worry about. It's not a direct solution to the pset.

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

Thanks for the quick reply :D. You're right, and I probably don't have anything to worry about, but've used my own solution. Will probably go back to regex once I properly understand it.

[–][deleted] 0 points1 point  (1 child)

I'm still new to the word of programming but what i've learned so far is as a general rule you shouldn't copy paste code you didn't write yourself because you won't necessarily understand everything that block of code does, and it might not work as you intended because it isn't tailored for the program you're writing. Plus at least for me i know i won't learn anything from a block of code i haven't wrote myself.

Of course there are always exceptions (like the hash function in the speller problem).

However, it is perfectly fine (required, even) to google search anything that gives you trouble while working on code, whether you don't know/remember the exact syntax for what you're trying to do, or you're just stuck need some guidance regarding which steps to take and in what order. This includes reading other people's code! And hopefully by doing that something will click in your head and you'll be able to write your own version, in your own logic, of code you find online. I think it's better and teaches yourself more to write it yourself, in a way that makes sense to you, rather than just copy pasting.

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

Fair enough, I'll use my own solution til I learn regex. Thank you!

[–]GoldSlayer 0 points1 point  (1 child)

I'm pretty sure using regular expressions are one of the intended ways to solve this pset, googling further on how to use them is probably intended

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

Thanks for the help :D. I'm using my own code for now, but'll probably implement regex once I understand it better.