Delay In Screencast
Ok, I said I wasn’t going to edit the screencasts. But after viewing the first two, I now want to prepare and edit the screencasts; the raw format wasn’t as refreshing as I thought. I also will not record when I’m that tired and exhausted. I took today off completely to get some rest and will continue tomorrow after the mass. Stay tuned and I apologize for the delay.
Google APIs Are Available
Google released APIs for email, calendar, spreadsheet, gadgets, talk, and others. I didn’t get a chance to really drill them down in details, but they seem to offer a nice set of APIs to really extend any applications to utilize Google services. Integrating these APIs to your application is relatively simple. Just take a look at their document, it’s very straight forward.
Here’s what I don’t like about this. Although it’s not alot of money, features such as single sign-on, provisioning APIs, and email gateway interface require their premium service for $50/user account/year. But if you’re writing an app that uses such features, then why not?
Episode 2 – Setting Up
This is the first day of MyDrugs development where I create a Subversion repository for the project, check out initial documents, create a Rails app, remove index.html, create index controller, and check in the code. You can download the video by right-clicking on the link and do “save as” or whatever your browser says.
I may just finish the app tomorrow, so stay tuned.
Episode 1 – MyDrugs, Introduction
In this episode, I introduce my intentions and describe what MyDrugs is. There’s no code of any kind here. I don’t expect anyone to actually download this due to its content. You can view this here as I posted this to MotionBox.com, a YouTube competitor with better features.
I also recorded the second episode and it will be posted in few minutes. I had a long day today and I’m extremely tired as I had to crack open my Macbook Pro twice today. I hope I sound better tomorrow.
Setting Up The Screencast
As I was preparing for the screencast, I realized I completely forgot about the distribution. Considering the size of the files, I just don’t feel safe hosting on this server since I have other critical stuff running on it. I also don’t want to host it on my home servers although I have a plenty of bandwidth. Can you imagine if I pissed off Verizon and I have to give up my fiber connection?
I decided to sign up for Libsyn account. I always noticed when I download podcasts how fast they were from lybsyn.com. What I didn’t know was how cheap and hassle-free it was. This was an easy decision since it made sense even if I decide not to publish on regular basis.
Now, I have to get back to creating the content. Sorry about the delay.
Remedy For Slow Server Side Scripts
DHH posted an excellent point about outsourcing the performance-intensive functions last year. Here’s the link to his blog post.
I agree with DHH that we should not force ourselves to confine of Rails or Ruby, but take advantage of all the tools at our disposal. I get disgusted when someone labels themselves as a Java or C# developer. We should be just developers, period. As a CTO, I’ve seen too many uglyness that could’ve been done better if a developer was willing to expand beyond his/her chosen language or platform.
You can use File object to get a listing of a directory, but I think it’s lot better to simply system(‘ls’). Of course this is not always appropriate, but you get my point. To test this, simply open irb and type system(‘ls’) and see what you get.
If you have a server script that isn’t so nice with Ruby, then by all means, go beyond Ruby. Not only are you speeding up your app, you may boldly go where no Ruby developer has gone before.
Screencasts Coming
I was asked to demonstrate my ability to write Rails code today, and I thought it would be a perfect opportunity to record a series of screencasts where I create a simple app from start to finish. I’ll start recording this tomorrow and post it. Just a few caveats:
1. I’m not editing the videos. It will be very raw, but I think it’s rather refreshing.
2. I may skip a day or two since my wife started morning sickness. I personally don’t know why it’s called a morning sickness since she’s sick all day. It’s not easy being a geek with a job and a family.
3. It’s a simple app and I’m not going to write a commercial grade app with all the exception handling other than the obvious.
So, stay tuned.
ss Is Much Better Than script/server
I was somewhat shocked when someone asked me how come I type “ss” instead of “script/server” to start the server. He also asked me how come it doesn’t work on his computer. It dawned on me that a good percentage of Rails developers are from Windows and never worked on Unix.
For those switchers to Mac, here’s what you do. Simply add aliases in /etc/profile and restart the terminal. Below is what my profile looks like. For those Unix geeks out there about to flame me for not having other aliases or why rm includes “-rf”, just go away, it’s my preference.
# System-wide .profile for sh(1)
PATH=”/usr/local/bin:usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/mysql/bin”
export PATH# System
alias ll=’ls -alh’
alias df=’df -h’
alias rm=’rm -rf’
alias ping=’ping -c4′# TextMate as editor
alias e=’mate’# Subversion
alias sup=’svn update’
alias scom=’svn commit’# Ruby on Rails
alias ss=’script/server’
alias sgen=’script/generate’if [ "${BASH-no}" != "no" ]; then
[ -r /etc/bashrc ] && . /etc/bashrc
fi
Developing on Windows
I wanted to see what it would be like to develop RoR using Windows. After many hours of trying to recreate the experience of my MacBook Pro, I came up with a solution that really works. My solution? VMWare!!!
That’s right, I’m using VMWare to run Ubuntu.
The way I see it, it’s the only way. Developing on Windows is just too much pain. Out of all the editors I tried, UltraEdit came out as a clear winner, but I can’t use any editor other than TextMate. I’ve tried Instant Rails, but it’s not my cup of tea.
Ruby Thought Process
One of my favorite computer book of all time is “Object-Oriented Thought Process” by Matt Weisfeld. This book, in its first edition, helped this old C programmer overcome bad habits and truly reap all the benefits of object oriented programming. It’s really true that you have to change the way you think, not just learn a new syntax.
As I make my transition to Ruby, I still find myself thinking in C (when I refer to C, I’m referring to C, C++, Java, and C#). It’s just like learning a new language. You think of what to say in one language, a native language, and then translate in your head. I can vaguely remember (it’s been so long) when I came to US, I thought of what to say in Korean, translate into English, and then say it. That’s why you see so many foreigners saying things that just do not make any sense in context. However, it makes a perfect sense when translated to their own native language.
I’ve always been a native C programmer even when I programmed in VB. Now that I think about it, all my complaints about VB are due to the fact that I was still programming in C and VB was a translation. It’s very clear that in order to be proficient at Ruby, I need to change my thought process. Just as I became a native English speaker (didn’t take long when you’re that young), I need to become a native speaker of Ruby.