In 30+/-years at $work(EE doing realtime software), I found that if I got the data structures correct, the code usually flowed. If not, things got messy fast. Also, read all the code you can from acknowledged Perl experts(for me in the early days this was reading the Data General RDOS and AOS operating system code).
Domain knowledge is as important as Perl knowledge(You want to control a power system give me a call, develop a website not your man).
James
There's never enough time to do it right, but always enough time to do it over...
| [reply] |
> I found that if I got the data structures correct, the code usually flowed. If not, things got messy fast.
This reminds me of some famous quotes from Fred Brooks,
Rob Pike,
Eric S. Raymond,
and
Linus Torvalds:
The programmer at wit's end for lack of space can often do best
by disentangling himself from his code, rearing back, and
contemplating his data.
Representation is the essence of programming.
-- from The Mythical Man Month by Fred Brooks
Data dominates.
If you've chosen the right data structures and organized things well,
the algorithms will almost always be self-evident.
Data structures, not algorithms, are central to programming.
-- Rob Pike
Show me your code and conceal your data structures, and I shall continue to be mystified.
Show me your data structures, and I won't usually need your code; it'll be obvious.
-- Eric S. Raymond
I will, in fact, claim that the difference between a bad programmer and a good
one is whether he considers his code or his data structures more important.
Bad programmers worry about the code.
Good programmers worry about data structures and their relationships.
-- Linus Torvalds
Perl Data Structure References
- Tie::Hash - base class definitions for tied hashes
- YAML - YAML Ain't Markup Language
- JSON - JSON (JavaScript Object Notation) encoder/decoder
- JSON::MaybeXS - Use Cpanel::JSON::XS with a fallback to JSON::XS and JSON::PP
- TOML - Parser for Tom's Obvious, Minimal Language
- TOML Spec (github)
- Sereal - Fast, compact, powerful binary (de-)serialization
- SerealX::Store - Sereal based persistence for Perl data structures
- Config::Any - Load configuration from different file formats, transparently
- Config::Tiny - Read/Write .ini style files with as little code as possible
- Config::INI - simple .ini-file format
- Data::Dumper - stringified perl data structures, suitable for both printing and eval
- Data::Dump - Pretty printing of data structures
Perl 4 multidimensional array emulation:
- perlvar - if you refer to a hash element as $foo{$a,$b,$c} it really means $foo{join($;, $a, $b, $c)} ... where $; is the subscript separator for multidimensional array emulation aka $SUBSUP (default \034), borrowed from awk
- feature - note that Perl 5.34+ allows you to disable this old Perl 4 multidimensional array emulation via the 'multidimensional' feature
- perl 5.36 delta - ... and that use v5.36; disables multidimensional array emulation
- Whats new in Perl (youtube) by Ricardo Signes (TPC 2021) uses What is this madness? to describe this unfortunate multidimensional mis-feature :-)
See Also
Build and Test Automation References:
Updated: Many extra references added long after the original reply was made.
| [reply] [d/l] [select] |
| [reply] |
| [reply] |
Another advantage of a formal course is breadth of coverage. Learning only what you need to know at any given moment can provide a nice deep dive into that particular topic with the motivation that comes from being able to immediately apply it. For example, I know next to nothing about frameworks and CGI, because I've never had to learn it. I'd bet most Perl courses would cover them because that's a large part of what Perl is used for. Just not by me.
But God demonstrates His own love toward us, in that while we were yet sinners, Christ died for us. Romans 5:8 (NASB)
| [reply] |