Breaking the Language Barrier

spiralA little over three years ago I wrote up my Learning in Spiral post.My recent move to a full time Ruby on Rails project got me to think over some of those things again. I’m always looking back to reflect on how I got to where I am the moment. I think about major road bumps, and how I got over them.

Starting with dBase III and Lotus 123 macros

My very first experience with software development was by creating a database in dBase III. That helped me understand spreadsheets, and next thing I know, I was writing some macros in Lotus 123 (so that was my first experience with writing code).

I knew something about database and something about writing code, and got into Clipper. Smooth transition. Improved my knowledge of writing code by learning an xBase language (hadn’t done much actual coding in dBase). 

From there, to FoxPro: another xBase language, very similar to Clipper, and very similar database. Smooth transition.

From there, to Visual FoxPro (VFP). Pretty much same language, same database, but with the added object-oriented features. This hybrid aspect of VFP was kind of interesting: a developer could write an entire procedural application in VFP, without using any of its object-oriented features. Smooth transition.

VFP was also hybrid in regards to working with data. One could use xBase commands like in the old days, and/or VFP’s implementation of the Structured Query Language (SQL). So at first I’d only use the xBase commands, and eventually I learned SQL. 

Object Oriented Programming

Then it was time to understand Object Oriented Programming (OOP), since VFP supported that. Learned a little bit on my own, and took a 1-week class where I’ve learned a lot more about code reuse through classes, inheritance, etc. That was huge for me at the time. Major road bump to go from my procedural world to the object-oriented one.

With FoxPro being a dynamic language, I also did do some meta-programming with it; lots of dynamic execution of code based on things (include code fragments) stored in the database.

Somewhere around that time, I looked into Visual Basic 3. The language wasn’t too different from xBase, certain things were similar to VFP regarding how to create the graphical user interface (GUI), but the thing didn’t have inheritance of implementation! Also, I had been building database-centric applications, and boy, doing data access in VB 3 sucked really bad! What was it at the time? Dynasets? Yuck. Gave up on VB real quick. The transition from using the powerful data language in VFP to the handicapped VB was too much for me to bear.

From there, got into web development through classic ASP. VBScript sucked, and I quickly turned to using VFP COM components to spit out the HTML served up by ASP (the middle-tier and data access components were also VFP). I did get some experience with JavaScript, but nothing hardcore. Still, it was a strange language to me, after so many years of xBase languages.

Eventually I got into SQL Server (v6, I believe). I knew databases well at the time, but not a RDBMS. I did know the SQL language (from VFP), so the transition into SQL Server was relatively smooth (considering I didn’t need to do DBA-stuff such as heavy performance running, setting up security, etc.).

At one point I *thought* I knew OOP well, then I started looking into Design Patterns, and realized there was a LOT I had to learn. At least at that point I was comfortable with the language, so I could focus on the patterns, architecture, and so on.

Strong Typing, Patterns, Functional

Then I started to look into C#. I had never done any C-like language. The closer to it had been JavaScript. So C# looked *really* odd to me. However, I did know objects, classes, methods, OOP, patterns, etc, so the transition into C# hadn’t been as hard as I thought it would. It was mostly learning a new syntax, and then adapting my previous knowledge acquired from practicing OOP in VFP. Ah, there was one major difference, though: strong typing and case sensitivity. Took me a little while to get used to that.

There was something that I didn’t have a quite good grasp on, though: interfaces and delegates. You see, VB 3 (or 6… I did do some VB 6 at some point) didn’t have inheritance of “implementation”, but it did have inheritance of “interfaces”. VFP was the other way around (it had inheritance of implementation, but no interfaces). And as far as delegates, VFP didn’t have anything like it (and remember: I didn’t know any C-like language, so “function pointers” didn’t mean anything to me). 

One day C# gets features normally present in “functional” languages, in the shape of LINQ. Well, I had never even seen a functional language. At that point, LINQ just looked like the SQL implementation I had in VFP, and that was enough to get me started using it. 

After some more exploration, I started to learn more about the things that enabled LINQ: generics, lambdas, extension methods, type inference. To be honest, I don’t think I quite understand the math behind lambdas and all of that, but I guess I learned those things in C# well enough to make some good use out of it. Interesting transition from using LINQ thinking of it as “SQL for C#” to “oh, I think I’m getting this functional stuff now…”.

Back to Dynamic, but also SOLID, TDD,…

Eventually C# then gets dynamic features. I used and abused of those features as soon as I got my hands on it. I figure how to do some interesting things with those features. Interesting transition back to the dynamic world I was used to in FoxPro. 

What other things did I learn while doing C#…? Hmm, SOLID. Unit testing and Test-Driven Development. Internal Domain Specific Languages (DSL’s) using extension methods… all those things only made more sense after I felt relatively comfortable with C#, though. Also, using dynamic features in C# has made me give even more importance to TDD.

…and today, Ruby…

Objects, check. DSL’s, check. Functional features, check. Meta-programming, check. TDD, check. For sure, all this knowledge accumulated over the years through all these languages have made it a lot easier for me to learn and enjoy Ruby. I’m still at a point where I “speak Ruby with a C# accent”, but hey, I still speak English with a Brazilian accent. 🙂 

It’s good to reflect upon all of this and realize how much I’ve evolved transitioning from one language to another, always bringing something in the baggage throughout the journey and learning new things as I go.

Now the weird thing is that I know I’ll eventually get into Objective C, and based on all the comments I hear, that’ll be like going 20 years back in time as far as a programming language is concerned. I really need to find me some good motivation to there. Any ideas (besides “that’s where the money is”)? 🙂

P.S.: I’ve left out HTML, XML, XAML, because, let’s be honest, does anybody truly enjoy working with those things? They just seem to be a necessary evil that we need to cope with.  🙂

timeline

Advertisements

  1. #1 by Mark Wilkinson on August 5, 2011 - 8:46 am

    Hey man, I can’t find your new email now that you’ve moved on from EPS I have a question about your Rhino article.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: