In: , , ,
On: 2013 / 02 / 07
Shorter URL for this post: http://ozh.in/vy

Here is a story about a guy who tried to speak a language he didn't know. Like Twilight, there are several chapters in that story, but don't worry, it's not about sissy hormone troubled teenagers trying to grasp the meaning of life.

Chapter 1: Consternation

Three days ago, I spent some time looking for existing tools to migrate issues from a Google Project to Github. I found different scripts, in Ruby, Perl and Python.

First, I wasted quite some time getting the scripts to run because I was missing dependencies or modules and, depending on the language, it's more or less obvious how to add them (while I'm at it: Perl, it's been a long time. I hope it'll be another long time).

None of these scripts really suited my needs, so I wasted some more time trying to customize them, but I failed because what I wanted to do was a bit more complex than what my limited understanding of these languages allow me. I don't speak Python.

  try and edit Ruby, Perl then Python scripts
+ fail 
+ go to sleep angry because of wasted evening
---------------------------------------------
= 3 hours

Morale of that first chapter: don't try to speak Japanese if you don't speak Japanese.

Chapter 2: PHPfication

Then I got a dramatic revelation: "Jeeeez, st00pid, why don't you just code it yourself? Duh!!". Indeed, as I first went and search for something already existing, and slowly got dragged into wasting more time, I just haven't had the idea. But looking at that Python script (man, I was *this* close to hack it the way I needed :) something obvious surfaced: working with Github's API and its OAuth stuff is plain easy (makes me wonder why it's such a pain in the ass with Twitter, for instance)

So, I started from an empty migrate.php and in less time than what you need to spell "supercalifragilisticexpialidocious", I got the perfect script for my needs.

  code in PHP from scratch
+ create at least 50 repos on Github to test and fine tune
+ success
+ write documentation
+ feel like an open source superhero
+ impress my kids during next breakfast
----------------------------------------------------------
= 3 hours. Or maybe 6 or 9, but hey, time flies when you're having fun!

Chapter 3: Publification

To know more about that script (promise, no more stupid chapter names!) go there: Google Issues To Github : a Migration Script in PHP

Final thoughts

Yes, I'm most probably moving YOURLS to Github. No, there's no announced ETA :)

Shorter URL

Want to share or tweet this post? Please use this short URL: http://ozh.in/vy

Metastuff

This entry "I don’t speak Parseltongue, but I speak PHP" was posted on 07/02/2013 at 5:52 pm and is tagged with , , ,
Watch this discussion : Comments RSS 2.0.

No Comment yet

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
Gravatars: Curious about the little images next to each commenter's name ? Go to Gravatar and sign for a free account
Spam: Various spam plugins may be activated. I'll put pins in a Voodoo doll if you spam me.

Read more ?

 « New Face