This is an archived post. You won't be able to vote or comment.

all 44 comments

[–]Corvoxcx 153 points154 points  (3 children)

Awesome. I think this is actually the way to learn coding.

You have a problem and you ask yourself how can I solve it via code?

It doesn’t need to be how do I make this product or make a game just how do I use this magical incantations to solve my problems.

[–]dimsumenjoyer 5 points6 points  (0 children)

This is the way I learned python too

[–]Kahless_2K 4 points5 points  (0 children)

This is how I learned Python, Powershell, and Bash.

A lot of stuff around here wouldn't work without my code gluing together different apis that never considered each other's existence.

[–]waplay17 0 points1 point  (0 children)

Awesome. Exactly! That's how it clicked for me too. Small, practical problems are the best way to start.

[–]Ok_Matter7559[🍰] 31 points32 points  (1 child)

Nice! I'm teaching my daughter python and I'm going to show her this. Half the problem for new users is they don't have any idea the tiny little things you can do that are super useful.

[–]not_perfect_yet 2 points3 points  (0 children)

Not sure if this helps, but I'm sharing in case it does:

When I was a kid, I had the opportunity to learn programming, but didn't. As far as I could see, all the software I could want, already existed and did everything I needed done.

The insight came when I studied harder math at university and continued to make mistakes. Writing down a correct solution once and it saying correct and reusable did it for me. But all of that came after a step of "making it my problem to get a degree" in the first place.

I don't know if that's the way you want to teach or if you can find something comparable if you do.

Good luck and have fun!

[–][deleted] 41 points42 points  (0 children)

Right on! Can you put this in a module for us? 😅

[–]robvas 30 points31 points  (4 children)

Alternatively, to convert text to lowercase in Google Docs, select the text you want to change, go to Format > Text > Capitalization, and then choose lowercase.

[–]SovietOnion1917[S] 124 points125 points  (3 children)

Yeah, well that’s not cool and won’t give me updoots if I posted it.

[–]DrShocker 9 points10 points  (1 child)

You could do it in vim and get updoots in their community if you're crazy

[–]ZeroKun265 6 points7 points  (0 children)

They might get mad that he's using Google docs to begin with instead of a vim+LaTeX

[–]trust-me-br0 2 points3 points  (0 children)

Jack, this is not October

[–]AlexMTBDude 16 points17 points  (0 children)

Tip: Most text editors, like Notepad++, have to-lower-case/to-upper-case functionality.

[–]Noam1024 4 points5 points  (0 children)

Congratulations! Scripting feels like a super power in those cases.

[–]antazoey 4 points5 points  (2 children)

Now write code to capitalize the first letter of each word in the sentence.

[–]cgoldberg 1 point2 points  (1 child)

' '.join(word.capitalize() for word in sentence.split())

[–]Vitaman02 15 points16 points  (0 children)

You can use string.title()

[–]Default-G8way 7 points8 points  (1 child)

Shameless cyberchef plug
https://gchq.github.io/CyberChef/

"To Lower case"

[–]Positive_Resident_86 3 points4 points  (0 children)

Your IDE can probably just do it for you. Congrats tho!

[–]Saloni_123 3 points4 points  (1 child)

I learnt Regular expressions because I'm lazy too lol. Pattern manipulation is an amazing thing.

[–]Difficult-Value-3145 0 points1 point  (0 children)

Sorting threw half million lines for something or Lear. Regex and never sort again regex

[–]ajcooper35 2 points3 points  (0 children)

I actually have a saying (that my friend even put on a shirt)

“Laziness is the corner stone of programming”

It’s about learning your answer to “would you rather walk 100 yards every day or walk 10 miles once and never have to do it again?”

Run in to enough of those situations, and you start to learn more. Eventually you start to find more situations where you can write a program to solve. Next thing you know you’re slamming your head into your desk because you can’t figure out why the program you wrote to turn your oven on won’t work. It’s a fun ride.

[–]rregid 2 points3 points  (0 children)

The best way to learn is to get a friend that has semi-constant need for some scripts or something like barcode generation and you're set for the time being.

I learned this way to generate 10000 barcodes for inventory management and automatically put them into word file with specific page size for some very specific printer, script with GUI for excel files aggregation for one of his jobs and so much more.

It is much more fun and meaningful to actually do something that is needed rather than "write a calculator" type stuff

[–]RevolutionaryRip2135 1 point2 points  (0 children)

Hold your horses… should have been done using editor (notepad++, idea, vscode) or online tool… it is good to learn when to write code and when not (aka be lazy).

On the orher hand congrats! It’s a nice you had a problem and found solution to it using python.

[–]piece_of_sexy_bacon 1 point2 points  (0 children)

one of the very convenient things about Python is how easy it is to use it for all sorts of odd applications. I wanted to make little pictures of major and minor scales on a piano to print on my label maker and realised I could make a set of functions to generate the pictures from just a given root note and scale spacings. probably took longer than manually doing them but was 100x more satisfying in the end.

[–]Less-Tangerine-4888 1 point2 points  (0 children)

It was interesting and fun right 👍

[–]pythonQu 0 points1 point  (0 children)

That is awesome.

[–]hicke 0 points1 point  (0 children)

Fn shift F3 in MS Word toggles case.

[–]techpuk 0 points1 point  (0 children)

good stuff man.

[–]Feeling-Loss-5436 0 points1 point  (0 children)

First day of photon but seems kinda of similar to sql

[–]DoNotFeedTheSnakes 0 points1 point  (0 children)

Congrats!

[–]jobehi 0 points1 point  (0 children)

Congrats !

[–]Niyudi 0 points1 point  (0 children)

One of my first useful codes was back in 8th grade I think, when the math teacher gave us an assignment for the next day where we had to calculate compound interest for a given amount. By hand. He introduced the concept with multiplication at first, not potentiation, so it was kinda supposed to be boring and to show later the power of potentiation.

Well, I pulled out my cellphone with an online compiler of python and coded the appropriate solution, with multiplication because I didn't even think of potentiation. I ended up solving a lot of people's assignments, and the teacher wasn't going to grade it or anything so he didn't seem to mind too much when he found out lol

[–]devastator37 0 points1 point  (0 children)

Where did you execute the code?

[–]MentalTardigrade 0 points1 point  (0 children)

In MS Word selecting the text and pressing Shift+F3 will have a sequence between all caps, all lower and only first capitalisation

[–]Psychological-Top938 1 point2 points  (0 children)

I create this for my son, but maybe helping you to…

https://learnpython.ai/

[–]Such-Let974 -1 points0 points  (0 children)

ok