... and this is my blog. When I'm not hacking away at a project, I play in the band Ship Wrecks.
Using Java enums can provide more than just its surface benefits (i.e. type-safety, etc.). Enums can be used in a way to make your code more intuitive and legible.
One of my favorite aspects of enums is using enum constructors and member-variables. For example, if you need to write code that handles different types of file processing, the most common approach would be to write code like this:
However, a better way to write the same thing would be to use the enum constructor (private FileType()) like this to polymorphically decide which FileProcesser to use:
10 months ago Notes (0)
I made this today because sometimes I get the key symbols mixed up. If you have Photoshop, make your own (psd file - 1.2 MB).1 year ago Notes (0)
So I learned a few interesting things while setting up my new MacBook Pro today. The main problem that I have with Apple’s automatic copying is that sometimes I don’t want to copy all the junk off my old computer; I just want the important stuff (iCal, Mail, iTunes).
I figured out how to copy only those things; this can be pretty handy, so I thought I’d share. Just as a precursor to this post, if you don’t feel comfortable messing around with preference files or if you’ve never looked inside the /Users/username/Library directory, you might want to think twice before you try this. Also, it should be known that I was using OS 10.7 for both machines. I don’t know the implications of trying this between operating systems; some preference files or directory structures could change.
First, it almost seems too intuitive, but connecting your two computers together with a cat 5 cable will allow them to interact as though they were on a local network; the computers show up as network machines. I expected I would have to go through a router, but that is not necessary.
Getting all of my iCal calendars to sync via iCloud wasn’t working properly; only a few of them were showing up. To copy my iCal calendars, I closed iCal, deleted ~/Library/Calendars off my new computer, and copied over ~/Library/Calendars from my old computer to the new one. I also replaced the following files in ~/Library/Preferences:
Then I opened up iCal and all my old calendars were there - magic!
I didn’t even try to get Mail to work; I just went straight to the copying approach. The following folders looked relevant:
I deleted those folders off my new computer, and copied over the folders from my old computer. I also replaced the following files from ~/Library/Preferences:
All of the mail in my inbox was there when I opened up Mail; the only problem I had (and it’s not really a problem) was that my email passwords weren’t in the OS X Keychain. I just had to provide the password for my various email accounts.
I managed to get iTunes to work by simply replacing the contents of my ~/Music folder. iTunes will verify the library when you open it up. If you have any devices that sync with your iTunes wirelessly (I have my iPhone), you need to plug them into your new computer in order to set up wireless syncing.
Okay - that should be all you need to copy over the essentials to your new Mac.1 year ago Notes (0)
Since everyone keeps asking. This is Paul covering Album of the Year by the Good Life.1 year ago Notes (2)
We wrote this EP during an effort to strengthen ourselves emotionally and improve ourselves personally. This time of year, many people make resolutions to make this year better than the last; we hope this EP can have the same effect on your life, and possibly intervene in a time when you are thinking of giving up on those resolutions. That’s why we’re now offering it as a pay-what-you-want download. Get better.
My band, for free. Get it.
(Source: wearewrecks)1 year ago Notes (2)
Bon Iver – Beth/Rest (piano version)
This is so good.
(via fuckyeahemo)1 year ago Notes (454)
I’ve been getting this any time I install anything… I’m gonna keep thinking it’s benign.2 years ago Notes (1)
Let’s hope this installation of Xcode 4.4.1 works this time…
I just did one of these: sudo /Developer/Library/uninstall-devtools —mode=all
And re-installed using “Install Xcode” from LaunchPad… Who uses LaunchPad anyway? (Quicksilver is better)2 years ago Notes (1)
Our new EP came out today! Visit this link to stream it in its entirety or purchase it for $4.
We’ve worked very hard on this, and some of our good friends have helped make this something we are so proud of. If you can afford to, please pick up a copy at a show, order one, or get a digital copy. All of these songs mean a lot to us, and we hope they’ll mean a lot to you too.
Being in a band is hard work. Check out some of Ship Wrecks’ (ours) here.2 years ago Notes (4)
Tonight we’re going to be previewing and talking about our new EP on WLVC. Have a listen!
8PM - Listen online: http://stuorgs.lvc.edu/wlvc/ - Submit your own questions through AIM (username: WLVCRadio)2 years ago Notes (1)