GRE
In case you’re wondering, it went well. Now it’s time to get into graduate school.
In case you’re wondering, it went well. Now it’s time to get into graduate school.
‘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:
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.
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.
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.
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.
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.