Jason Baker // Just another random geek. Visit my homepage at http://jason-baker.com
Follow me on twitter: http://twitter.com/jasonsupdates
If there's one part of a programmer's professional development that is harder than it seems, it's starting a side project. I, for instance, love to program. The funny thing is, that programming is the easiest part of programming (those of you who are true programmers will know what I mean). The hardest part is starting to program and finishing your work.
That said, I do have a few bits of advice for programmers who want to start a side project. If you follow my advice, you probably won't write the next big thing, nor will you have a side project that will stand out particularly well on your resume. But you'll probably write something that will make you a better programmer, and that's the point, isn't it? Here's what I've learned about starting a side project:It seems to me getting good at writing comments is an under-appreciated part of a Programmer's development. However, I feel that this is a part of programming that's almost as important as writing code itself. So, here are some of the biggest misconception about comments:
def get_x(self): """ This method gets x. """This is about as close to being a canonical "bad comment" as you can get, and yet people who should know better still do it. Why? Because they feel that they should document every function or class. The reality is that documenting something that needs no documentation is universally a bad idea.
This is a subject that many programmers get confused about. The difference isn't really a difficult concept, it's just that it's not explained to programmers very frequently. Let's consider a snippet of a poem by Jeff Harrison:
I just came across a blog post that outlines 5 rules for writing good code. I agree with them for the most part. But this subject is extremely subjective and will vary from person to person. Therefore, I'd like to write up my own rules for writing good code.
A while back, I asked a question on Stackoverflow that taught me something (other than what programming languages are fun to work with). A lot of programming language authors just aren't very good at marketing their languages.
There are a lot of programming languages out there that I wanted to try out, but couldn't figure out an excuse to spend my time on them. And that's pretty sad considering how much I like trying new languages out. Therefore, I'd like to present to the world my ideal website for programming languages: the Ruby webpage. In fact, I have to admit that if I were trying to decide between Python (my favorite programming language) and Ruby today, I'd easily choose Ruby just based on their website. And that would be sad considering how much I love Python. Let's take a look at why this is.I still don't understand why this is such a difficult concept for some programming languages. The first thing I want to know is how my code
will look if I write it in your language. With Ruby, it's right there on the first page. Now try doing the same thing on the Python webpage. Not as easy is it?
Even if you don't want to put it on the first page, it should at least be reachable using one click on the first page. See the Scala webpage for an example of this.
Hey, your language is cross-platform, has object-oriented and/or functional and/or concatenative and/or [insert language buzzword here] features. Good for you! Since you've taken a whole lot of time to provide me with great features, show them to me.
Again, I hold up Ruby as a prime example of how to do this. Right on the front page is Ruby in Twenty Minutes. This shows me all of the great features in brief code examples. And if that doesn't work for me, I can even try Ruby out in my browser. As an example of how not to do this, I present the Unicon webpage. From the front page, I can gather that Unicon is a "very high level, goal-directed, object-oriented, general purpose applications language", but that's about it.And one other thing, don't try to sell me a book. Yes, you should make it easy to find books on your programming language. No, you shouldn't remind me of it every chance you get. I view suggestions to buy a book as being somewhat like asking me to move in with you on the first date. Yeah, I find you interesting. I'm just not ready for the commitment.
I've been meaning to blog about this for some time, so I suppose now
is as good an opportunity as any. This is going to be a very "stream
of consciousness"-esque posting, so bear with me. Some of these are
things that have radically changed the way I use emacs. Others are
minor changes that I like. Feel free to pick and choose from them.
sudo apt-get install python-ropemacsAfter that, just a couple of lines of elisp in your .emacs file and
(require 'pymacs) (pymacs-load "ropemacs" "rope-") (setq ropemacs-enable-autoimport t)
(require 'anything-config) (require 'anything-match-plugin) (global-set-key "\C-ca" 'anything) (global-set-key "\C-ce" 'anything-for-files)Then, prepare to spend a lot less time searching for files!
(require 'linum) (global-linum-mode 1)
sudo apt-get install pyflakes...and some elisp:
(when (load "flymake" t)
(defun flymake-pyflakes-init ()
(let* ((temp-file (flymake-init-create-temp-buffer-copy
'flymake-create-temp-inplace))
(local-file (file-relative-name
temp-file
(file-name-directory buffer-file-name))))
(list "pyflakes" (list local-file))))
(add-to-list 'flymake-allowed-file-name-masks
'("\\.py\\'" flymake-pyflakes-init)))
(setq uniquify-buffer-name-style 'reverse) (setq uniquify-separator "/") (setq uniquify-after-kill-buffer-p t) ; rename after killing uniquified (setq uniquify-ignore-buffers-re "^\\*") ; don't muck with special buffers (or Gnus mail buffers)
sudo apt-get install python-modeAnd add some elisp:
(autoload 'python-mode "python-mode" "Python Mode." t)
(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))
(add-to-list 'interpreter-mode-alist '("python" . python-mode))