Re: Advice for next steps on my Perl journey
by eyepopslikeamosquito (Archbishop) on Apr 28, 2023 at 22:04 UTC
|
I keep a list of Learning Perl links:
Hopefully, you'll find something of interest there.
Any links you find especially useful, please let us know.
| [reply] |
|
Thank you! I have some pdf of perl books, but I'll add some links, if I find something else.
| [reply] |
Re: Advice for next steps on my Perl journey
by hippo (Bishop) on Apr 28, 2023 at 22:09 UTC
|
Have you looked through the Tutorials section? There are plenty of articles there covering a wide range of topics - there's sure to be something at your level and area(s) of interest.
Have you written a module from scratch? That's one step we have all had to take at some point. There are tutorials for that too. If everything you have done so far has been script-based then moving into modules would be the logical progression.
| [reply] |
|
I have checked that out, but its always good to go back.
I haven't written a module yet, perhaps I should check out more safe coding practices before I look into that. Thank you!
| [reply] |
Re: Advice for next steps on my Perl journey
by GrandFather (Saint) on Apr 29, 2023 at 05:48 UTC
|
One way to get exposure to a good range of problems at all levels is to hang out here. For questions that look like something that you may be able to handle, have a go. Not with providing an answer here as to immediate goal, but just as a exercise in solving problems and writing solutions to those problems. If you want your answer "marked", post it as an answer, perhaps with a caveat depending on your comfort level. Even if you don't post an answer, you can at least see what other people have posted and compare your approach to theirs.
Perl has a lot of power hidden away in the corners, but it is generally a fairly forgiving language. If you want to post code here and have it critiqued, go for it. Questions go here (SOPW). Requests for comments might better go in the Meditations section. In general small self contained scripts will be better accepted than larger scripts or scripts that depend on external resources such as files or databases (CPAN modules are of course ok).
Update: clarify "external resources" - thanks hippo
Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond
| [reply] |
|
Yeah, you're right I could be more of a part of this community and work on writing self contained scripts. Thank you.
| [reply] |
Re: Advice for next steps on my Perl journey
by choroba (Cardinal) on May 01, 2023 at 20:05 UTC
|
I'm probably repeating myself, but I hope not frequently enough to annoy anyone:
You can check the Pull Request Club. If you join, you'll be assigned one project a month to contribute to. For me, it was a magnificent way to learn about existing modules, understanding their source code, different styles and restrictions they follow; to get in touch with their authors and maintainers, to get familiar with testing, development and deployment tools. I even got a T-shirt! :-)
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
| [reply] [d/l] |
Re: Advice for next steps on my Perl journey
by cavac (Parson) on May 03, 2023 at 14:23 UTC
|
A little bit of self promotion here, but you could play around with Net::Clacks, which is a real time messaging library i wrote. It has some basic examples of a chat client. You could build a little home automation project around it.
I would suggest trying something like this:
- A central clacks server that handles the messaging.
- An Arduino with a few buttons to act as "mission control". A Perl script that takes the button presses via Serial and sends NOTIFY messages via clacks. This way, you'll learn how to use Device::SerialPort to talk to a microcontroller.
- A couple of cheap "smart power outlet" thingies flashed with the open source Tasmota firmware. A Perl script that takes the NOTIFY messages and sets the state of the power outlets. It should also read their current state and STORE that state in Net::Clacks. This will give you the opportunity to learn basic control of stuff via Web Apis.
- A simple command line tool that RETRIEVES the current state of all power outlets from Net::Clacks and also lets you power on/off those devices.
- A more complex "command line GUI" using Curses::UI to do the same.
- Add a temperature/humidity sensor to the Arduino and make sure to update the Perl script to regularly power temperature and humidity to Clacks.
- Add a new "automation" service that reacts to temperature and/or humidity, decide if, say, a humidifier needs to be on and send that signal via Clacks to one of the existing Tasmota power outlets.
- Write a new clients that logs all kinds of states (tasmota on/off, temperature, humidity) to a database using DBI every minute. And learn during this the basics of using a database like PostgreSQL.
- Write a script that reads the last 24 hours worth of data from the database and generates a temperature and/or humidity graph. GD::Graph should come in handy for that, although you could also use Gnuplot to generate ASCII art graphs for command line use.
- Add Mail::Sendmail to your "automation" script to send warnings mails of temperature or humidity falls outside some limits you set.
At first, it may sound complex, but in the end you will have a handful of somewhat small scripts that work together through a messaging system. Each script does very little by itself and should be easy enough to understand, yet you should be able to accomplish quite complex tasks when you combine them.
I don't know about you, but i myself feel a certain satisfaction when i write programs that not only do stuff on screen but interact with something in the physical world. For this years Linuxdays in Graz i made a robot that handed out lollipops to children (and adults!) when they pressed a big red "Emergency Stop" button: "Giving out free lollipops the engineering way" (YouTube)
| [reply] |
Re: Advice for next steps on my Perl journey
by stevieb (Canon) on May 03, 2023 at 05:17 UTC
|
Do you guys have any hard but not too hard ideas for projects or some suggestions of learning certain modules or whatever to put me in the direction of knowing and being able to program professionally.
I started here. I was energetic, enthusiastic and ready to go. I was Perl, all in. I fucking delved deep. I read the likes of Merlyn to learn how references work. I still didn't understand. I worked my ass off on doing simple things, contemplating "what can I do to move forward".
What I did, was go to the main CPAN page, look for projects that I liked, and started writing patches. I started writing my own things, but was afraid to publish them. With many Monks behind me, I started gaining confidence. I started answering questions here. I then learned how to publish my own work, which I finally did, getting out of my comfort zone. It took some time to be confident, but here I am.
OP, I see in you what I saw in me back in the day. Back then, I had nothing; no clout, no help.
Want to learn Perl? Get a hold of me and I will finance you to be at the conference in Toronto in July. I offer to you what I could have wished for myself.
-stevieb
| [reply] |