Coredump

Work, play, and everything in-between.

Archive for the ‘programming’ tag

Hear me ROR

without comments

Sounds cheeky, that. :P

Playing with Ruby on Rails in my spare time, which isn’t much now that I’ve moved to a new workplace.

ROR, at first glance, seems pretty tame. I’m not a full-fledged developer, so I wouldn’t know the nuances of the language, but being able to rapidly prototype an app is a pretty good deal in my book, and ROR passes that fairly.

I’m using the Instant Rails suite for this ROR play — I haven’t found the time (yet) to install ROR on Linux. Instant Rails is nifty: it has Apache, MySQL, PHP and ROR in a static location on your disk. The configuration file is smart enough (or dumb, depending on how you look at it) to know that the program locations have changed, so it adjusts accordingly. Deploying an application is straightforward: just edit the hosts file, start up Mongrel, and you can view the instance on your browser.

I’ll update this space on my progress.

Written by Ian Dexter

May 29th, 2007 at 8:23 pm

Posted in Play

Tagged with , , ,

FizzBuzz

without comments

Hmmm

In Bash, I would have done:

$ for i in `seq 100` ; do if [ `expr $i % 15` -eq 0 ] ; then echo FizzBuzz; elif [ `expr $i % 3` -eq 0 ]; then echo Fizz; elif [ `expr $i % 5` -eq 0 ]; then echo Buzz; else echo $i; fi; done

Then again, it took me about 10 minutes to do that. (I couldn’t get the ternary operator to work, somehow.) In C: about five minutes (rusty — I last used C way back in college {ages ago!}).

In a recent phone interview, I was asked to programmatically (in shell) rename a set of files. I blundered for about two minutes, and gave up in the end, saying I could probably do that by experimentation. I could fairly say I passed that interview. The point? Answering “FizzBuzz” questions does not reflect real-world situations — it’s how you approached the problem, even if you didn’t get the answer, that matters.

If I were an interviewer, I’d concentrate on the steps rather than the solution.

Written by Ian Dexter

March 1st, 2007 at 5:18 pm

Posted in Play

Tagged with , , ,

Snapshots

with 2 comments

  • I’ve just installed a web-based IRC client on Dreamhost. Now I don’t have to worry about firewalls blocking IRC connections .
  • Brushing up on my C skills again, helping out a former co-worker on some coding stuff.
  • I hear Google is going the offline route with Google Docs. Cool. Finally! (But that’s just speculation, of course.)
  • And, oh: didn’t make it to the IOSN Linux TOT (got shortlisted but didn’t make the cut). Well, it’s okay. There’ll be more opportunities for that. I probably won’t be able to take the LPI certification exams as well — my company made me choose between those exams and training from another vendor. *shrugs* Later…

Written by Ian Dexter

October 12th, 2006 at 6:59 pm

Posted in Play, Work

Tagged with , , ,

Willie Loman gets help from double helix

without comments

“Given a number of cities and the costs of traveling from any city to any other city, what is the cheapest round-trip route that visits each city exactly once and then returns to the starting city?” [Travelling salesman problem, Wikipedia.]

Well, don’t despair, Mr. Loman, because DNA computing is on the rescue. DNA computing works like this:

Release thousands of DNA sequences into a pool, and the simple thermodynamics of hybridization means each strand will end up finding its partner. Thus the dream of DNA computing - massively parallelized by the ability of many, many small pieces to diffuse and hybridize in a solution. Via Madprime.org.

Uh, okay. Right… For those of us who like pictures, Discovery magazine offers a beautifully rendered comics:

Willie Loman gets help

Written by Ian Dexter

June 16th, 2006 at 1:54 am

Posted in Play

Tagged with , ,

‘Sourceforge for .NET’?

without comments

From Monkey Bites:

Microsoft’s CodePlex is an online open source development home base for C#, Visual Studio and .NET programmers. It’s a place where developers can track their projects, post builds, and interact with other community members. Think of it as a SourceForge for the .NET set.

Okay, I’m not a developer (except for the occasional dabbling in PHP and Perl — but that’s not exactly “development”), but I’ve been hearing good things about .NET. I remember someone saying it’s the only good thing that came out of Redmond.

And for Microsoft to host open source projects for .NET is something worth watching. I wonder how open source developers will take this.

Written by Ian Dexter

May 17th, 2006 at 3:58 am

Posted in Play, Work

Tagged with , , ,