Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
We don't bite newbies here... much

If I had a Free Two Months...

by samizdat (Vicar)
on Jun 22, 2005 at 13:21 UTC ( #468997=perlmeditation: print w/ replies, xml ) Need Help??

... what would I code? {Assuming my wife and I don't have something more interesting to do, that is...}

I can think of lots of little things, like a sweep command that recursively applies its arguments (and their arguments) over all subdirectories. I had one of those in DOS a looong time ago. It's easy enough to handle the simple case of no arguments to the repeated command, but adding the capability to execute a complete shell command line is a little less trivial. The DOS widgie I had never learned that trick, but it should be doable on *NIX in Perl.

I've got a few bigger nuts I'd like to crack, too, but I said two months, not two years. :)

I've been a model train nut since I was a little kid, but there's always been one insoluble problem for me: no people. Blender3D gives us OSS that can render animations in real time, but how about making ghost people that load themselves onto the real models on a video screen? Now that CPUs and graphics engines are in the G-FLOP range, is that finally becoming possible?

I spent a lot of time when I was independent in business designing a little hardware trainer that would help kids get a start on computing, programming, and independent problem solving. With commodity hardware tumbling in price, anything designed for a niche market is a goner. I put it to bed with regret, before I'd dropped the hundreds of $K on tooling and production. So, I say to myself, just what software could I build that would run on one of these little *NIX boxen being designed to sell in the Third World for a hundred bucks? What would bridge the Digital Divide? What would show young people (including today's typical high-bandwith-input addicts here in the US!) that they should learn to program and think for themselves?

So, okay, what would you all dream up? :D

Comment on If I had a Free Two Months...
Re: If I had a Free Two Months...
by ghenry (Vicar) on Jun 22, 2005 at 13:31 UTC

    Update: Got carried away and missed the point of the last question. I think Google's Summer of Code is good for the young ones. How young a programmer are you aiming at?

    I would love to build and design a "Replicator", you know, like the ones on Star Trek ;-)

    Perl related, I would like to get a module written and tested and uploaded onto CPAN.

    Not much really...

    Fancy a Just ask!!!
Re: If I had a Free Two Months...
by coreolyn (Parson) on Jun 22, 2005 at 13:50 UTC

    Interesting you should mention Blender. I spent $7500 on a high end graphics box with all the bells and whistles over a year ago just so I could really 'dive in'. With Blender and custom kernels.

    Now I have a $250/month bill for a high end email/browser box that I never have time to do with what I wanted to.


    Two months would only get things set up . . .

Re: If I had a Free Two Months...
by bibliophile (Parson) on Jun 22, 2005 at 13:57 UTC
    Heh - I'd start trying to figure out how to build a tool that could convert Microsoft Access projects to Perl/Tk/db-of-your-choice (or perhaps to some kind of LAMP).

    Lordy, would that make my life easier!

Re: If I had a Free Two Months...
by pboin (Deacon) on Jun 22, 2005 at 14:53 UTC

    One problem that's a personal curiosity for me has been this:

    Given an inventory of train track pieces (my boys love Thomas), figure out what permutations make connecting, valid layouts. Report back any successful layouts, in descending order of complexity.

    I've spent some spare cycles thinking about this one, and I've come to the conclusion that I'm just not smart enough. I could probably able to do it with straights, curves and a pot-load of coffee, but once you throw in switches and cross-over bridges -- fuggetaboutit.

      This sounds essentially like a graph theory problem. Have a track segments be arcs and the places where they connect be nodes. I don't know exactly what the criteria are for a "connecting, valid layout", but I'll assume it's at least planarity (no tracks crossing one another) and that there always exists a non-zero-length path from a node to itself. The presence of cross-over bridges permit a special case of track-crossing, so graphs with a c.o.b. would be allowed to be non-planar only for the c.o.b. arcs. Switches are just two arcs going to/coming from the same node.

      Once you've got the graph designed, you can start tackling the problem of laying it out spatially so that it fits with the pieces.

        That's pretty much what I've thought about so far. The place where my brain just starts to smoke is the switches. Not only does a switch have one 'in' and two 'out' paths, but if you flip it over, one 'out' is in the same place and the other 'out' is in a third place.

        I just can't figure out how the recursion would work in that situation. Fortunately, I'm too busy with paying work to figure that out right now.

      Situations like this are already well-solved in EDA tools like gEDA and other schematic capture and physical layout packages. These challenges would be a good place for Higher-Order Perl applications, as they're microworld problems like the 'Blocks World' problem detailed in AI books like Patrick Winston's Artificial Intelligence. What you describe is actually a fairly straightforward 2D+layers situation, and if you limit the allowable turnout designs and curve-piece radii, a recursive try-and-test application becomes very doable. It would work a lot like the Tetris solver used as an example in the Jaguar book, although the solution network would be much more complex and certainly the visualizer would, too.
        I didn't think about it, but board layout... yeah, it's got to be very similar. However (at least 10 years ago), I heard stories about those programs running days to get good layouts. I know it's not 10 years ago though :)
Re: If I had a Free Two Months...
by kelan (Deacon) on Jun 22, 2005 at 15:22 UTC

    Is your sweep utility something like this? (Note: untested)

      Why didn't you use File::Find? That solves the infinite loop problem which you've ignored. It works the same as yours except its less buggy and uses system() with distinct arguments to avoid accidental shell processing.

      #!perl -w use strict; use File::Find; my $start_dir = shift; find( sub { system @ARGV if -d }, $start_dir );

        I knew someone would ask:) I've never used File::Find, which is why I didn't. I don't have much need for recursively processing directories. My post was mostly about showing that it wouldn't take two months to write something similar, rather than present a full solution.

        I used system that way on purpose, so that it would go through shell processing. The OP specifically mentioned wanting to send shell commands through, and those probably would be more useful if the shell got to process them.

Re: If I had a Free Two Months...
by tphyahoo (Vicar) on Jun 22, 2005 at 17:20 UTC
    I'd try to organize something like Community Wizard, financial watchdog software for the government sector, that Hamilton Technology had going on in the late 1990s before the department of justice confiscated it and destroyed the backup tapes.

    "Fitts recalls how, back in days after she cleaned up Irangate, BCCI and HUD fraud scandals, the one thing that gave her the most hope for cleaning up government was emerging technology, particularly the Internet. Prior to the mid-1990's, being a government watchdog was impossibly difficult, so... Hamilton Securities, created a computer program called Community Wizard which gave the user powerful capabilities of assessing and vetting all kinds of financial data on government and corporate business, all in an easily understood format....

    Community Wizard was a data wonk's dream, until 1997 when Department of Justice agents destroyed Fitts' office and computer files and left her with nothing. However, Fitts knows Community Wizard can be recreated and, like the proverbial phoenix, the Solari Network will rise in its place."

    Grow the economy, save the world, and put some bounds on the financial fraud epidemic the United States is having.

    UPDATE: For starters, this might be an enhancement to an existing wiki system, to incorporate markup that would allow spreadsheet formula-like functionality -- collaborative accounting with version controlling. I know, I know. Yeah right. Oh yeah? Why not.

    For seconds, I might try refactoring sql-ledger with the strictures and a sane html templating system, and use this as a basis for another way to foster distributed accounting and try to steer some direction towards open source accounting systems, which currently are quite disappointing unfortunately. See (OT) Perl Open Source accounting packages? where lemming observed, pretty much, Accounting packages can be thought of as source control with money.

    For thirds, I would tie the above in with cyclos, in my opinion the best, but still not entirely satisfactory (need to do more research on this) open source community currency tool. (Note: Cyclos is in java, not perl, IIRC.) And into the mix, nbarter, an idea I'm toying with for multidirectional barter, kind of like friendster with a virtual currency function.

    See also:

    Toward a new community wizard

    Regarding problems with cyclos, my last notes from beyond money has something about "What needs to be done: Rewrite Strohalm's Cyclos open source software so that it matches the GSX specifications, specifically fixing major security holes, enabling intersystem trading and allowing businesses with multiple offices Price Dual card readers and related equipment." I am not sure if this has been "fixed," but this is the last thing I was looking into.

    UPDATE 2: Twiki, done in perl, already has spreadsheet-like functionality, I discovered after checking around. Now, is it robust enough to do this kind of thing? I'm playing around with it to try and find out.

    UPDATE 3: I was just kicked off the solari forum, for reasons I won't go into here; long story. The above "towards a new community wizard" link, which is really where it all started, now shows "guest" for all my posts, which were previously marked tphyahoo. Ouch

    I still think the path I outlined is a good one, and continue to look into it, although it appears doing this as a joint venture with solari folks is now an avenue I will have to abandon. Despite being kicked off the forum, and uneasiness with some aspects of the "solari universe" I encourage everyone interested in this sort of thing to learn about what catherine fitts and the others associated with the project are doing.

      That sounds like an awesome project. With OSS, too, it can be propagated so fast that any OSS *NIX box could have it. Of course, it's not just the tools, it's access to the data of concern. There does seem to be a growing tendency to ignore Open Meetings and FIA requirements these days, with the blessing of "our" congresscritters.
        I assume you meant FOIA (Freedom of Information Act) request. I have a little FOIA saga of my own, where I requested original data for treasury financial reports, and was told, absoutely. Only, it would cost me fifty thousand dollars.

        The treasury FOIA compliance office backed down later, kind of, sort of... But my conclusion was that this was a wakeup call that fixing things towards transparency is not something that some "hero" can accomplish alone, it requires collaboration from a large group of people, outsiders with day jobs, and insiders who have access to the data but are too scared to whistleblow. This means collaboration, and collaboration tools, and this is the infrastructure that needs to be put in place.

        Nix or windows, thanks to Active State perl and windows dummy install Apache Friends, I say who cares about the OS. Tools should be web enabled, and the work distributed in a wiki like way. If you build it they will come...

        See also my solaridatabank space, where I discuss FOIA troubleshooting, the demise of and hamilton software, and other matters related to such a scheme as this.

Re: If I had a Free Two Months...
by perrin (Chancellor) on Jun 22, 2005 at 19:16 UTC
    I actually have a list. (Yes, I dream about having two months free far too often...)
    • A first release Cache::Cache2.
    • A simple hack to add news items to the mod_perl homepage.
    • Polish up my presentation about caching modules and publish it as an article.
    • Polish up my presentation about object/relational mapping modules (Class::DBI, Tangram, SPOPS) and publish it as an article.
    • Update my templating article to cover Petal (it is already mentioned) and changes in the others over the last few years.
    • Add real support for many-to-many relationships in Class::DBI.
    • Make a client for memcached using libmemcache and Inline::C or SWIG.
Re: If I had a Free Two Months...
by TedPride (Priest) on Jun 22, 2005 at 22:23 UTC
    If I had two months, I'd totally redo my parents' web site from the ground floor up and set up a proper forum system. I don't really have the time any more to do large projects just for the heck of it.
Re: If I had a Free Two Months...
by Ninthwave (Chaplain) on Jun 22, 2005 at 23:49 UTC

    • Get a pegasosppc box and start playing with the powerpc chip.
    • Get my resume together and get a better job
    • Refine my code into discreet compact libraries
    • Try coding for myself to make sure I am not becoming a sysadmin type programmer
    • Teach my daughter more perl, she really enjoys it when we do have some time to sit down and code together and that should be encouraged more
    • Not worry about a customer's unreasonable deadline and my boss's idiotic acceptance of it
    • Get away from the computer for at least one full day
    All of these are or's. I would really love to get some personal modules together so I don't have to keep living this cut and paste lifestyle that my work is currently enforcing on me. But right now time is always yesterday for any project due date and there is never any time to be ready for the next project as they are stacked ahead one after another. Why oh why do the pointy haired ones run things.

    I feel slightly ashamed all of mine are personal but I have been stressed at work and am screaming for me time.

    "No matter where you go, there you are." BB
Re: If I had a Free Two Months...
by techcode (Hermit) on Jun 23, 2005 at 00:29 UTC
    Oh people, please keep posting :) I just might find myself in a situation like this.

    I'm just finishing my Advanced School (BS equivalent - tree years) and after, whats that, 8 + 4 + 3 = 15 years of education I want to make a break.

    Sure eventually I plan to continue it to at least Masters (and will of course learn as long as I live but I'm talking about attending classes, labs, exams ...), but I want at least one year without it now. On the other hand it would be good to get some job - or at least do more freelancing.

    What I plan to do, let me see (unordered):

    • Lose some weight that I got after appendix operation and yes a little bit of inactivity. I'm preparing my bicycle (repearing it) for loosing fat. Also slowly started on some fall-trougth, pushups, abs and similar. Guess when I can do those with ~ 10 Kg extra, latter it should be easier :)
    • Learn a bunch of things they don't teach you in school (well mostly not). Like CVS, basic Linux and Apache admin, mod_perl (get more experience with it) = they don't teach even plain Perl :( And some business and entrepreneurship knowledge ... planing on starting my own little business ...
    • Someone mentioned it before. Write some modules to stop copy/pasting a bunch of code. I do some freelancing and deadline is not yesterday. It's usually 5 days ago or something like that :)
    • At least start working on many sites I've planned. One of them (on first place on to do list) is a Perl learning website. Targeted especially @ beginners.
    • I've probably forgot something.
    Will think about it all when I finish with .edu things. Few exams and two projects (one is dissertation project) to go.
Re: If I had a Free Two Months...
by etcshadow (Priest) on Jun 23, 2005 at 03:14 UTC
    I've had a plan banging around in my head for a few months now to put together a simple, lightweight lisp-like functional language, that centers around the concept of implicitly parallellized evaluations. It's a little more complicated than that, though... It's intended to introduce a somewhat new way of really thinking about state.

    Anyway, if I had a couple of months, I'd actually finish pounding out the initial version, and, if there were enough time, make it run on parrot (and, in the process, learn parrot).

Re: If I had a Free Two Months...
by jhourcle (Prior) on Jun 23, 2005 at 04:56 UTC

    One of five things, that I've been putting off for various lengths of time:

    • A route planning program that accepts inputs about the quality of roads (road construction information, moderated user input, etc.), and the time variability of the quality (when rush hour is, school years, night time driving conditions, etc), to provide better quality directions than mapquest and other similar programs. (after taking a road trip in 1997, based on mapquest directions, and finding that I was in a 40mph zone on I20 through Louisiana that was single laned ... which I only took to avoid the pothole poxed I30 through Arkansas) And of course, I have no GIS experience.
    • A recipe system, that can provide suggestions based on available ingredients, chefs (skill level), equipment (no grilling, if you don't have a grill), diners (allergies, food intolerences, likes/dislikes). Build using some form of markup, rather than just something like the MasterCook formated stuff, so you can provide suggested alternative ingredients, track cooking times (with chef skill level) so it can suggest the whole plan for a meal so it's done at the right time, and/or help and or instructions to learn new skills. (big plans that I've been mulling over for years, but have probably gotten it to the point that it's unrealistic). Inspired from my own food intolerances, and the occassional potluck, where I'm afraid to bring stuff that someone else might react badly to (allergies, etc.)
    • Finish a program to generate memorable passwords. The basic routines work, I just need to get it seeded with more content, so it doesn't create a security problem. (see the pod in it, for an explaination of the problems)
    • Software for my tivo, so I can automatically grab recipes from the show I'm watching. (I have all of the necessary screen scraping so I can mine FoodNetwork's website, but never finished learning java to make a tivo front end for it, and enter it in that contest they were having)
    • Figure out who the right person is to bug to submit a patch for Pod::Html, so it stops generating invalid nested lists. Okay, that one's not coding, as I already did the coding part. I just need to figure out what to do with it now.
Re: If I had a Free Two Months...
by TedPride (Priest) on Jun 23, 2005 at 05:22 UTC
    jhourcle: Your route planning idea is fine, except where are you going to get the raw data from? Regular mapping programs use people who drive around with a GPS, but there simply isn't the budget for enough of these to provide any sort of real-time (or even recent) monitoring of road conditions. You'd have to have devices built into the cars to track average speed along each stretch of road during each time segment. I'm sure some company somewhere is working on this already.

    Your recipe idea could work, assuming you had enough people to collect recipes and enter them according to your rather detailed specs. There's no reason why you shouldn't be able to enter a type of food, a cooking method, a time limit, and a list of main ingredients and get a list of optimal recipes. The allergies and food intolerances would be easy to add later, since those are based on ingredients and food types and probably won't need any additional data entry.

    The memorable passwords generator has to do with how the mind works more than anything else. This sounds like the most interesting puzzle to solve.

      With systems like On Star there are more and more vehicles adding road data to systems - the trick is that that data is not very public. It is certainly public enough to raise numerous privacy concerns, but not for JAPHs to noodle with.


      Trust me, I've been thinking about this for over 8 years, I've done my homework, even if I don't know GIS systems. (but I do have a friend from high school who works for ESRI). State transportation boards keep metrics on their road systems, so that they can do long term planning. There is also a community of people who are obsessed with roads... there used to be a few road related usenet groups... if you can get them to 'adopt' an area, they'd probably be more than happy to tell you what the conditions are like. You can use human psychology for those aspects (like Amazon's "top X" reviewers), or try to get funding from an organization to provide cash/prize incentives. (there are lots of companies who would love to have this information...maybe some trucker's union could help, or someone like Mobil, who do travel guides)

      And I'm not talking about real time -- although there are groups that track that sort of thing, I'd like to be able to integrate, I'm more interested in the beginning of just dealing with formulaic information -- like don't drive the DC metro anywhere near rush hour, unless it's a holiday.

      I also expect it to have some growing pains -- CDDB and IMDB sucked in their early days, until they had enough people giving input for it to become worthwhile.


      The requirements are actually based on shortcomings of the various systems -- you need to use ontologies or something similar, so that you can translate to foreign languages, or even regionalized dialects of the 'same' language. Most Americans wouldn't know what 'castor sugar' is, because it's sold as 'superfine sugar' in the US. Likewise 'icing sugar' is sold as 'powdered sugar' or 'confectioners sugar'. Even within the US, 'all-purpose flour' in the south isn't the same as 'all-purpose flour' in New England (different protein content). And what qualifies as a 'large' onion. Eggs are regulated, but most other items aren't.

      And I've already planned out a potential sponsor for this one, too... if you could get someone like the Food Network to back it, then you could have the database link to the various DVDs they sell -- maybe even ship the software on the DVDs, so that it'd know that it could prompt for the disc, and queue up the right scene, if you wished.

      As it is, many recipies could probably be automatically be parsed, and then have someone review adjust/whatever them. And you'd probably want to accept recipes that aren't so anally organized, but then you couldn't use alternative display formats or do unit conversions, scaling, etc. (scaling is trickier, as it adjusts the time, but not typically linearly -- you might need to adjust pan size, or do multiple batches, or it has no significant effect.)


      Take a look at the link I gave to the proof of concept -- it uses sentances (currently based on fortune, but I want to seed it with movie/tv quotes, song lyrics, books, etc) as a mnemonic, and then generates a password based on the input.

      (and, if nothing else, I've probably convinced people that I'm obsessive compulsive, as I said earlier)

Re: If I had a Free Two Months...
by Popcorn Dave (Abbot) on Jun 23, 2005 at 05:59 UTC
    One thing I've always sort of had in the back of my mind is a Toys for Tots type of thing but for birthdays. Collecting donations so you could make sure that needy kids get a present on their birthday. It's a wonderful thing that people do at christmas time for needy kids, but it would be nice to be able to help those same kids on their birthday too. Too many people help out only at christmas time and never again.

    My other option would be that if I had two free months I'd love to go across Europe on a motorcycle. Just get out and do the thing that most people do between college and responsibility. Just me, the laptop, and the bike. No plans, no route, just go where you're lead. Of course I don't know how easy it would be to come back to responsibility after those two months.

    Money was no option right? ;)

Re: If I had a Free Two Months...
by DrHyde (Prior) on Jun 23, 2005 at 09:09 UTC
    Your 'sweep' program sounds like find $dir -type d -exec ... \;!
      Okay, add another two-month project... make a /usr/games/fortune database called 'Did You Know You Could...' with a web-based updater for all the neat things you can do on *NIX boxen. Sort of a dynamic version of UNIX Power Tools. I have my prompt set up to display a fortune each time I log in or su, and I think this would be more useful (though less humorous) than fortune -o...

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://468997]
Approved by ktross
Front-paged by Old_Gray_Bear
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2014-03-16 13:40 GMT
Find Nodes?
    Voting Booth?

    Have you used a cryptocurrency?

    Results (326 votes), past polls