Friday, 31 December 2010

Ruby, Python and 2011

Well, after playing a little with both Python and Ruby, I must say, I really like both languages.. However, I'm leaning towards Ruby with it's native OO benefit. Like, everything is OO.
That being said, should I do the project in Ruby, I'll definitely do another site in Python too, as I see it a definite worthwhile language to have too!

Also, had a great idea for a simple Android app... So lots happening in the new year!
I'm SO glad I haven't heard any year rhymes for 2011... I used to hear them each year: 2009 (something something divine), 2008 (something something great)... bleh.. I'm sure someone out there has used "heaven", "leaven", or something. I don't wanna know! haha

Have a good rest of 2010 - catch you next year!

Tuesday, 28 December 2010

the snake ate the stone to the music...

Where I was

OK, so a new project is starting in the new year. And I need to select a platform and possibly learn a new language in the process. In the middle of December, I had two choices: Symfony 2 (in PHP) or Ruby on Rails. Both would require a learning curve, but as I'm quite familiar with PHP development, Ruby would require a steeper learning curve.

There were a bunch of factors that I started considering in this decision, not only for myself, but also for my client. I want to develop a sturdy, fast and expandable solution (that's a given). But also, I want to leave them with a solution that doesn't tie them into using me as a developer. Not that I have any plans to abandon them, but I know of people who tie their clients in and I think it's a shocking scenario. Clients should come back to me because of my solid solutions and good service, not because they kinda don't have any other options.

So, obviously, the PHP as a language would be the most popular choice if you're talking developer availability. I found out that we have a Ruby community in SA, but I don't think it's near as big as the PHP one (that's my impression, at any rate). HowEVER (and that's with a capital EVER), Symfony is it's own beast. A PHP developer is not necessarily a Symfony Developer, and many PHP developers settle for more CMSey solutions like Wordpress and Drupal, or other popular frameworks such as ZEND, CakePHP or a simpler framework such as CodeIgniter. This, in my opinion, levels the playing fields between RoR and Symfony as developer support in SA.

The plot thickens

Being on holiday in Cape Town is a great thing. Generally, it's just a good thing. More specifically, it's always a place where I start to think outside the box. Maybe it's the mountains, maybe it's the sea. Whatever it is, I value the way it makes me think differently. So, being in a bookshop in Somerset Mall, I stumble upon a Python book. Something I never considered as an option. My relatively simple decision had gotten more complicated. Now there were 3 contenders: Symfony 2, Ruby on Rails, or Django (python based). I thought to myself, if I'm considering an option where I'd be learning a new language (Ruby), who's to say that Python shouldn't be that language instead. So I buy the book.

Having done some research the last couple of days, it appears that the Rails popularity of 2008 is in a mild decline, and Django and Python is in an increase... Though, that's no reason to choose one from the other. I've decided that 2011 I want to do a project in each (RoR and Django) but, which to tackle first, if not Symfony, is the big question. My gut feel tells me that Python will be easier to get into, but I'll have more support with Rails. So that's where I stand.

I've also just found out that Python 3 (the book I bought) is not usable with Django currently. So the book might show me things that are still un-doable if I do choose the Python route.

At least I can not be accused of making a rash decision when it comes to the path forward. I will know which solution I'm going with on Jan 3, for now, I'm reading more, playing more and hopefully clearing more pro's and cons for each.

Monday, 22 November 2010

iBurst woe's and solution

I recently ran out of prepaid iBurst again (why I use prepaid iBurst is a whole other story).. and to my surprise, the normal recharge page had an error. I suspect that iBurst wasn't letting me see the recharge page cos I didn't have Internet left to see the page!

An oversight! Pretty much, what one landed up with, was an infinite loop of redirects, one which safari and other browsers (yes, I tried them all) intervened and showed a message like this:

It's hilarious if you think of what is possibly happening: "go somewhere... you have no internet, so go to this page... can't, you have no internet so go to this page.. can't, you have no internet so go to this page" x 5 million.

So, what to do, right? Well, fortunately, the URL of the frame of the recharge window was in my browser history... but, that didn't give me the navigation to recharge, only my account overview showing me zero balance. Then I took a guess, which paid off, I changed the content.php to index.php, and voila, the whole page appeared! I was now free to recharge my internet. For those of you who don't have it in your history, the page is: https://customer.prepaid.ibcore.net/index.php?bw_depleted=1

Now if you don't have Internet, you're probably not reading this now, so I'd encourage you to bookmark that link for when you DO run out on iBurst, in case they haven't fixed this.

Not exactly hacking, but not exactly what your average user can be expected to figure out. Nice one iBurst. You guys are all as bad as each other. I'm soon hoping to be hooking up with ADSL, and jumping into the uncapped world! Yea, that's right, it'll be like 1999 in America, here, in South Africa, today. once.



Friday, 28 May 2010

new resource site

Hey - check out the new Christian resource site I've created. Feel free to give me any feedback:
www.crossreference.co.za

Monday, 17 May 2010

I boast no more, by Caedman's call

This song has always blessed me, and it's particularly important when the LORD uses you for His glory, as a reminder, that we boast only in the cross of Christ, only in the grace of God at what He has done in our lives, and only in His power, without which, we wouldn't be able to breath one breath or lift a hand...

Praise God for what He is doing, how He is moving, His majesty is always there, it doesn't arrive only when we see it, the same way the stars and planets were just as glorious before we had the lenses to see them!

What an awesome song, I'm gonna listen to it again now:

No More My God, I boast no more
Of all the duties I have done
I quit the hopes I held before,
To trust the merits of Thy Son

(chorus):

No more my God

No more my God

No more my God

I boast no more

Now, for the loss I bear his name,
What was my gain I count my loss
My former pride I call my shame
And nail my glory to His cross

Yes, and I must, I will esteem
All things but loss for Jesus' sake
O may my soul be found in Him
And of His righteousness partake
Amen, amen

The best obedience of my hands
Dares not appear before Thy throne
But faith can answer Thy demands
By pleading what my Lord has done

Friday, 16 April 2010

nifty little renamer

I'm pretty stoked about a little Automator function I set up to handle a problem I deal with a lot as a web developer - bulk renaming files...

So first, the problem. I get a bunch of 15 or 50 files to use as assets online, either documents or images for a gallery or something. So, more often than not they come like this:

Points tO the KEYNOTE SPEAKER.doc
NewsLETTER version 4.0.pdf
etc

Now, spaces are bad on web, and caps are dreadful. When dealing with a unix server it's worse because you have to match the case exactly. So, mac users - fire up nifty Automator... Let's create a Service:


You'll want to click on the Service option (selected in the image) because that way you'll have your function added to any right click!









Then you'll want to do a couple of things. What I do is create an output directly, which in this case I've called "sized" on my desktop, because my original outputs were all resized images. I digress, create this directory wherever you want it.

Now, you'll see your screen divided into two halves, as indicated in this image. The left half lists functions you can use (arranged in a sort of category -> function drill down effect), and on the right is your flow.

You won't have any items in your flow section yet, so for starters, select "files or folders" in the drop down. This sets the service to expect input as files and folders.

Now, after doing that, you've told automator you're gonna give it files, you need to tell it what to do. So, for safety, start with a copy:

On the left window, in the Library under Files & Folders, find the "Copy Finder Items" task, select it, and drag it into the right-hand window.

Select your desired directory (I've checked "replace existing files").

Then find the "Rename Finder Items" task, and drag it across. Select the dropdown to "Replace Text". Enter a space into the Find: textbox. (I selected in basename only). I then entered an underscore ( _ ) in the Replace: textbox. This is now set to replace all spaces with underscores. You can change your options accordingly.

I also added another Renamer task to set the name to title case. I'll yet do another task which will set the extension to Lowercase. Wow, and save - all done. It's added to the Services menu.

Feel free to download the workflow I did here. Put it in your Services folder, in the Library folder in your user directory. [/Users/_your_username_/Library/Services].

A toaster to the person who picks up the irony in the download...

Thursday, 15 April 2010

A thought on testimony

In Deuteronomy 19:15 the LORD decrees that only by the testimony of two or three witnesses will a charge be sustained. It is a requirement of the LORD that this be so. Interestingly, a decree from the LORD is established and fulfills this requirement, there are two AND three witnesses, two witnesses in observation, three witnesses in agreement.

When the LORD said, "Let there be light" - it was declared, it was so, and it was established with two witnesses to the member of the Godhead who thus spoke, and with three witnesses in terms of agreement to the truth and validity of the speaking.

Everything the LORD does fulfills this - there is agreement, unity, and truth which is all established in any decree.

Rejection of the idea of the trinity, where the three Persons of God is One, means the falling away of the fulfilling of this requirement.

Check out John 5 where Jesus provides witnesses for his testimony - John the baptist, His own works, the Father, scripture, and Moses... that's 5 witnesses to His testimony. Everything fits! wow...

Wednesday, 31 March 2010

My thoughts on the Apple vs. Flash battle...

Some history: Apple seem to be launching an all out offensive against supporting Flash on their mobile, mini devices.

I don't think that the Adobe and Apple fight over Flash is about technical issues with running correctly. I think this is what Apple are bleating, but I think it is far from the truth. Here's the real problem Apple face, and it's strategic. Apple are relying on their developer kit for iPhone to win over thousands of developers... and that has been working. A significant reward is needed to convince companies that it's worth developing in a totally new environment on a new platform: Enter iPhone Apps and revenue as the reward, and the Objective C and Apple developer stuff as the environment... Now, logically, once companies are developing for iPhone, iPod Touch, iPad, it's not a far leap to develop full-on Mac apps. What has happened, the Mac has become a developers platform, highly supported and tons of software being written for it. Can you see where I'm going here: Flash on these devices, will undermine their strategy of getting more developers, because suddenly people can bypass their precious Objective C platform, and simply use Flash and Flex. Apple don't want this. They REALLY don't want it, cos while in the short term it will benefit them to have more apps in the form of flash apps, in the long term, they go back to square one, and don't have a mass of mac developers.