http://qs321.pair.com?node_id=63562

I'm not sure that this belongs here or in Meditations, but here goes:
I have been programming Perl for about 2 months now, and have found it to be a blast! I use Perl primarily at work. My dilemma is that now, I have found myself having way more interest-level than work-related programming ( I am a network engineer, not a "programmer"). Naturally, I am excited to continue learning Perl, but, at the same time, I am having a hard time generating an idea(s) for a project. I really want to create something useful for others, not just something that I alone would use. Doesn't need to be anything grandiose, just something more than a throw away script. Can anyone else share where their direction comes from?

2001-03-12 Edit by Corion: Moved to Meditations

Replies are listed 'Best First'.
Re: Idea Generation for New Programmer
by BlueLines (Hermit) on Mar 11, 2001 at 07:15 UTC

    The best programs are written because of necessity.

    I started off my perl life as a sysadmin. My first perl program was a wrapper for whois, which i wrote when multiple registrars started doing .com/.net/.org registrations. It was 10 lines long, and awful, but it saved me keystrokes. And i'm lazy.

    My second program automated some named operations. It automatically checked out (via rcs) a zone file while it was being edited (so that multiple people wouldn't be able to change the same file). It also automatically incremented the serial number of the zone file (something i always forgot to do).

    My third program scanned through inverse dns records, and checked them agains A records. Once again, this was something that took forever to do by hand, so laziness was my motivation.

    I guess what i'm getting at is the fact that i'm sure there's something that you have to do all the time that would be nice to be automated (network tests / cisco configuration, for example). So find something that you hate doing, and automate it.</p?

    Remeber, the three virtues of a good programmer are Laziness, Impatience, Hubris. Make sure that at least one of those virtues is the driving force behind your code, and you'll be set....



    BlueLines

    Disclaimer: This post may contain inaccurate information, be habit forming, cause atomic warfare between peaceful countries, speed up male pattern baldness, interfere with your cable reception, exile you from certain third world countries, ruin your marriage, and generally spoil your day. No batteries included, no strings attached, your mileage may vary.
Re: Idea Generation for New Programmer
by ailie (Friar) on Mar 11, 2001 at 06:32 UTC

    Like you, I am fairly new to Perl. I find that the exercises that have been most useful for me sprang from other interests in my life. My hobby of quilting has led to several quilt-related perl scripts, which have required me to seek out new perl knowledge. I'm not sure how many other people will use my scripts, but I enjoy creating and learning from them.

    So my advice is to let ideas for perl projects come to you away from the computer - and then you can assimilate your hobbies into perl!

      Indeed, I'm also all about the hobbies over anything practical (I'm not reliable enough to be doing anything widely important yet). I just discovered that Perl was great for creating mathmatical algorithms. One could be smart about it and create formulas and derive your algorithms, but that would be too easy. I personally like to stare at numbers and look for patterns. And Perl, for all it's Perlish reasons, puts me that much closer to the numbers. Once you have your algorithm perfected and running in less than O(n!) (heh, that was unpleasant) time, then you can move it over to C or (good heavens) assembly to suck up that last couple multiples of CPU time for good measure.

      My current project (went into v2.0 this weekend bothering to release my O(n!) v1.0 ;) has so far taught me Benchmark, hash generation, that calling subroutines is to be avoided if at all possible, diagnostics, good formatting of diagnostic output, more about references, and various new built in functions. Anyway, I know I promised the algorithm this week, but I reduced the time to O(n^2) or something, am working on O(n) and might even manage O(1) if the Discrete Math Goddess will smile upon me.

      -Lexicon

Re: Idea Generation for New Programmer
by danger (Priest) on Mar 11, 2001 at 09:06 UTC

    This is perhaps another case in favor of something like arhuman's Workshop Area idea -- a place where new and seasoned alike can work together, issue and take on assignments and whatnot.

    As that doesn't exist (yet), another place you might want to look to exersise your talent is programming contests -- not necessarily entering them, but in working old problem sets. I'm thinking of the ACM programming contests in particular. You can find PDF's of the 2000 regional contest problem sets at this site, and searching google will turn up other sites with contests, or past acm contest problem sets.

    Now, such contests rarely have useful or practical problems in the everyday sense, rather, they are usually more abstract computer-science / algorithm / datastructure related problems (sometimes couched in real world terms, or as puzzles or mazes or some such thing). But you might find that working through some of them with Perl might be a rewarding challenge (perhaps with a decent algorithm/datastructure book at your side, like the clr book).

Re: Idea Generation for New Programmer
by cleen (Pilgrim) on Mar 11, 2001 at 07:43 UTC
    As a former network engineer I know exactly what you feel like. I am now a full time payed programmer for an ISP doing what I started to do at the last few jobs I have had. What I do? I take the best of two worlds and wrap them into one. Take my love for networking, routing and whatever, and making tools in which interface with them. For example I do alot of network automation type programming right now, from automating the installation and configuration of CPE equipment, auditing Cisco configs and Juniper configs with programs that I have written or helped write. Network monitoring is also a big "thing" in my programming life. I just got done a project that acted much like cadia's "Skitter" program that maps networks via the ASN's, but for a localized (company only) view. AS5800 (Dial chassis) cisco equipment, bgp/peer monitoring, real time graphing and all the cool stuff.

    Why do I think that I am good at this? Becuase I was a former network engineer, so I just think of things that I used to wish I had access to when I was doing network engineering. Things that would have made my life easyier and everyone elses life easyier. The ability to develop smart applications that I could use to automatically audit and reconfigure mis-configured routers, stuff that told me when some obscure service went unavailable (IE a modem pull reaching max peak or auditing a set of modems for possible bad ports, then disabling them)

    Just take what you know, think of what would be of great use to not only the 'world' but to you. Hack it out, erase it, then hack it out again!

    -cleen
Re (tilly) 1: Idea Generation for New Programmer
by tilly (Archbishop) on Mar 11, 2001 at 13:25 UTC
    The first thing that I did with Perl which resulted in my learning a lot of it was I wrote a program that was an endless loop. Every time it read a line it would copy the clipboard into $_, do something, and copy $_ back to the clipboard. (Using Win32::Clipboard of course.)

    The "do something" could be standard reformatting, copy, run some code, whatever. The script was awful in design and execution. However by always reaching for this (while working in VB without a decent editor) I learned regular expressions, had somewhere to play around with snippets of code meaning that I learned more, and it helped me get work done.

    In fact I still use the darned thing...

Re: Idea Generation for New Programmer
by fpi (Monk) on Mar 11, 2001 at 12:40 UTC
    Well, if you want to take your Perl in the direction of the web, you have a whole new world to open up and months and months of new things to discover. Think about it - Perl for the web isn't just html. You can add CGI, hook your scripts up to MySQL or any other database, have websites change content on the fly, including graphics via the GD modules. Any website you can dream of, you can create it with your newfound Perl. Start creating your own OO modules and you can build sites so fast that you can't possibly manage them all.

    But you say you are a network engineer and not a programmer. You can still find use for going in the direction of the web. I am neither a network engineer or a programmer by trade, but I just completed a server monitoring tool that logs to a database and outputs complete data analysis in multiple graphs that are generated on the fly. The output can be accessed remotely by internet. And it's all in Perl. For my purposes, the base code can be ported to medical and other scientific purposes for data analysis, patient care, and/or research.

    2 months? The nice thing is that even after 2 years and beyond, you'll still be discovering things about Perl that will keep you having just as much fun as you are having now.
Re: Idea Generation for New Programmer
by Hero Zzyzzx (Curate) on Mar 11, 2001 at 21:15 UTC

    I'm in a similar boat: new (a few months) to perl, but loving it. I've focused my learning around CGI and web database programming. I guess I'm fortunate that I have way too many good ideas and not enough experience (yet) or time to enact them.

    My ideas actually come from all over- family (my brother deals coins and is having me put his inventory management online, integrated with his website), myself (mostly for my personal site- photo albums, link list (ouch. . .)), and work.

    Another big source of ideas is other sites- seeing what they do with CGI and then going from there.

    I'd say keep programming, learning, and improving no matter where the ideas come from, whether work or personal. It's not wasted time when you're learning perl. You may not feel you're making "useful" stuff, but what you're doing is setting yourself up to be ready when something good (an idea, a job, a freelance offer) does come along. Investing in your skills will always pay off, if only personally.

Re: Idea Generation for New Programmer
by gopher (Monk) on Mar 11, 2001 at 22:40 UTC

    im also fairly new to perl, and have the same dilemma. i found that you should write programs that you need. for instance, i suck at math, and i wrote a basic calculator. now theres a billion calculator programs out there, but i wrote it anyways. it helped me understand certain commands in perl, and its semi-useful.write things that will benefit you, even if they are already out there. now, at some point this gets out of hand, but just for basic things ive found it works.

    Mr. Zoothornrollo, hit that long lunar note, and let it float.

Re: Idea Generation for New Programmer
by $CBAS (Scribe) on Mar 12, 2001 at 00:56 UTC

    Here's one idea that thought me IO::Socket and various CGI techniques (and a LOT of JavaScript/HTML/CSS): A webbased Napster/Scour/OpenNap/CuteMX searchengine. (never placed it online, not gonna put it there either).

    I'm glad I did it and I use it every day (too bad Scour went away and Napster might leave too, soon).

    I did the search engine while a friend learned Win32 API by coding the download client to go with it ... great way to spend a summer :-)

    Of course I always have a bunch of whacky ideas ... never get bored :-)

    Hope you take up the challenge, it's a great way to learn real-world stuff!
    CBAS

      I do this, and I also find that there is another module already out there written by someone to do it already... my next step on this discovery is to analyse the other modules code, and see how they did it differently/better.. I've found that I can see a lot of ways to contribute to other ppls work, and 'make the world a better place by sharing my code'.. in the case of Napster, try MP3::Napster modules.. see how your code shapes up :o)

        Sure there are tons of modules but where's the fun in that?
        Seriously, I don't think there are modules for CuteMX or iMesh. Those protocols are completely undocumented ... I reverse engineered part of them (enough to search and download).

        The MP3::Napster is more like a client (just like the PSX client, for Scour eXchange)

        And as always, I like my code better ... because it is ;-)

        Have fun,
        CBAS

Re: Idea Generation for New Programmer
by diskcrash (Hermit) on Mar 12, 2001 at 04:52 UTC
    Hey Tuna, I started with an emergency data munging application that drew me into file reading/munging/writing stuff. The next need was for an FTP dialog manager with a VERY brittle FTP server on the other end. (A custom app actually that looked like FTP.) My real interest is in data acquisition so I have a digital voltmeter and a weather station I want to build modules for, for display of data under Tk. Consider that you have expertise in one area and that you can be a code ambassador between your current knowledge and the Perl community. Novel and nifty client/server apps (think Napster) are always interesting. I am continuously amazed at the ingenuity of the Perl community and how easy it has become to do things that have been so hard. Consider that another asset of Perl dev is the ability to span disparate system types. That alone raises some ideas. Good luck, Tuna may you ride the Camel with style. - Diskcrash
Re: Idea Generation for New Programmer
by moo (Acolyte) on Mar 12, 2001 at 21:15 UTC
    When I started out programming in Perl, I tended 
    to use the examples in books as the basis for new projects.
    The new book _Perl:  How to Program_ by Dietal & Dietal has tons
    of source material on a wide variety of topics.  For example,
    you could fiddle with DBI, MySQL, and Apache on your windows
    or linux box and implement a web interface to a MySQL database.
    ( the book comes with everything you need ).
    
    The code you write there would then form the backbone for
    a logging system for any network related programs that you 
    write.  I like to create generic tools that can be used 
    anywhere and tend to stick them in category_Toolbox.pm
    
    Here is a challenge:  write a generic mySQL database 
    interface that:
    
    1) dynamically creates tables in a mySQL database from user
    input ( either by editing a file or asking questions...your
    choice ).  User input includes the table name, each column 
    name, the type for each column, and any associated 
    arguments.
    
    	a) make a subroutine that creates a column in the
          	table according to mySQL syntax.  You should keep
          	this simple and do not include all the options.
    
    2) takes a series of data values, maps them to a known table,
    and slams them into the database correctly.  It should 
    report back to you exactly what it did.
    
    3) allows users to query the database for info.
    
    4) allows db query access by users using any browser.
    
    Add more requirements as you see fit, but I'd keep it simple 
    for the first few cuts.  You might want to limit version 0.1
    to the requirements 1 and 2.  Once that's working, you can
    then add in the user interface.
    
    This is a project that I've had lots of fun messing with and
    have working.  It's not big and is really useful.
    
Re: Idea Generation for New Programmer
by Anonymous Monk on Mar 13, 2001 at 02:31 UTC
    Same as about everybody else:

    - eliminate repetitive tasks by writing front-end wrappers. We have several databases to update when we install a new switch, each has a different front-end written by different people. A nice perl script now does most of the work for me.

    - logfile watching, intrusion detection. Our pipes are too big for firewalls/IDS's, so we sprinkle a few logging ACL's for special IP's, and a perl script watches the logs for hit's on those filters. Then it adds a 'watch everything' rule to the ACL for the suspect IP, logs all of it's attempted connections, trys to figure out if it's dangerous and sends email if a threat is found.

    - GAMES!! I have about 90% of a Quake3Arena master server written, all in perl. And try writting IRC bots with Net::IRC, amuse your friends.