Recently, I have been reading a little bit of Code Complete each night, hoping that a little progress every night ends up to be a good bit of progress over the long haul. Like Jerry Seinfeld’s “Don’t Break the Chain” idea.
Anyways, one particular section in Code Complete regarding routines caught my attention: the difference between a routine and a procedure.
A function is a routine that returns a value; a procedure is a routine that doesn’t return a value.
I was pretty surprised that this straightforward differentiation was foreign to me until a few nights ago. Never was this distinction made in a CS course I took. Never was this terminology used by other programmers when talking about routines, methods, functions, procedures or whatever. Not even in the metric tons of blog articles I’ve read.
There isn’t any huge takeaway from functions vs. procedures, I am simply quite surprised that I dodged this concept until now.
Tonight, I took a look at Google App Engine after watching a video on it at our weekly brown bag lunch meetings and starting working through the Python tutorial. I quickly wanted Python syntax highlighting in Vim. Here’s how you can get it in Ubuntu as well.
It seems syntax highlighting doesn’t work in vim-tiny (which apparently is in Ubuntu by default), so I installed vim-full and vim-common.
sudo apt-get install vim vim-full vim-common
Next, we need to get the Python syntax package for Vim. I got it from vim.org. Save the python.vim file where you can find it.
Now, move python.vim to ~/.vim/syntax. You will most likely need to create these directories unless you have previous used Vim syntax packages.
Lastly, edit your ~/.vimrc file. Again, you will most like need to create this file. Add the following line:
syntax on
There, that should be all you need. I believe the colors are based on a black background, so you might need to do some tinkering if you use a a light background for your terminal. Hope this helps make your Python code a little easier to read in the future.
References:
http://www.vim.org/scripts/script.php?script_id=790
http://ubuntuforums.org/showthread.php?t=262750
The SOLID Principles, popularized by Robert C. Martin, were a topic of discussion in one of my classes this year. So far that class has largely followed on design patterns so Martin’s SOLID principles fit in well.
Via Uncle Bob’s twitter account, I read about reordering the principles in their order of significance. So, perhaps instead of the SOLLD principles, we should call them the SDOLI principles.
Overall, I’ve found these principles to be informative and definitely worth keeping in mind as one designs and implements a piece of software.
In a recent blog post, Jake Dahn noted that he was looking for a local development team and went into a few specifics of his ideal team.
It’s an idea that has been on my mind as well. I’ve had the opportunity and pleasure to work with a few ambitious and driven developers that are also looking to do some fun software development outside of school and work. Just like me.
So, we’ve decided to get together over the weekend (hopefully) and hack on some cool projects. We have some pretty good ideas, so I’m hoping we gain some momentum and get hacking.
No name for the group or anything yet. If/when we get a product that goes live, you can be sure I’ll mention it.
So my second-to-last semester of school has now been done for a few weeks. And I’m definitely looking forward to graduation. I took a course called Software Engineering this semester and the majority of the course is a team project to create a Mahjong game.
I worked together with two friends on the project and it ended up pretty good. We originally were going to write the game in Java because it’s the language we all know the best. But, we couldn’t figure out GUI programming in Java quickly and easily (within 2-3 hours), so we looked at C# and .NET. Using C#, we got a quick GUI up and running with a panel (or tile) on top of another one (that was the hard part in Java) in about 30 minutes or so. So, we ran with that quick demo application and created our Mahjon game.
My wife, Tanya, likes to play the game and so do several of our friends. We used Google Code as our source code repository because I didn’t want to go host it on my desktop (which would force me to leave the machine on 24/7). The code is still on the Google Code project site, under some open-source license, and there’s also a zip file that contains everything necessary to run the game. Just run the executable. No malware, I swear.
Enjoy.