GRE

In case you’re wondering, it went well. Now it’s time to get into graduate school.

Comments (3)

(define trotter? taking-gre?)

‘nough said. I’ve got the GRE today, so don’t expect to see any witty computer posts.

Still, I’ll leave you with one snippet of life-code to tide you over:

Read the rest of this entry »

Comments

Higher Order Procedures

Higher order procedures are something that I will talk about a lot here, so let’s get straight what they are. Higher order procedures are procedures that take a procedure as an argument or have a procedure as the return value. That being said, read more to see them in action.

Read the rest of this entry »

Comments

Ruby Tip: Eliminate Chains of Or’s

Do you have code that looks like this?

if ((var == 'foo) or (var == 'bar') or (var == 'other') or (var == 'stuff'))
  do things
end

If your answer is yes, then try this little trick to make your code more legible:

if ['foo', 'bar', 'other', 'stuff'].include?(var)
  do things
end

As an added bonus, you can use ‘%w’ to make the array creation cleaner:

%w|foo bar other stuff|

I love how Ruby makes my code squeeky clean.

Comments

Programming Languages

Is there a single best language to use for all programming tasks? I’m not sure. However, I am pretty sure that there are some languages that are unfit for almost any task. Here’s my take on the languages that I have seriously used.

  • Visual Basic – Great mocking up the UI of a new program. Terrible for everything else.
  • Java – Pretty cool, but too many rules.
  • Ruby – Ahh… very nice. I like the dynamic nature. I also like the ease with which I can throw around procedures.
  • Lisp – Sad to say, but I really haven’t studied this one enough. What I have studied, however, I am in love with. I’ve been following Abelson and Sussman and have thoroughly enjoyed everything I’ve learned. Raymond is right, learning lisp really does make you a better programmer.

So yes, that’s my brief summary of the languages I know. I’ll get more in depth later on why I like Ruby and Lisp so much. For now, just realize that you’ll be seeing a lot of Lisp and Ruby around these parts.

Comments

life-code: To-Do List

To give you an idea as to what life-coding is all about, have a look at the code for how to complete to-do list:

define do-task-list
  for item in task-list
    perform item
  loop
end

Though it says nothing about how to make task-lists or how to perform the action, it does provide a concrete definition of how to execute a to-do list. Over time, you’ll see these bits of code start to get integrated into a definitive system.

Comments

Who, What, When, Where, but especially Why?

  • Who? Trotter, programmer and general thinker.
  • What? This blog, life-coding.
  • When? Today.
  • Where? lifecoding.com
  • Why? I need an outlet for my thoughts on programming theory, coding practice, and the application of these two to living. More importantly, I’m seeking to explain how the application of computer science to everyday living can shape us into more effecient workers and better communicators.

Comments

« Previous Page « Previous Page Next entries »