Thursday, December 13, 2007

grumble

SomeDegree writeExams(Knowledge k, Studying s, Coffee c)
{
k.clear();
s.cramWith(c);
return null;
}

Tuesday, December 11, 2007

While I'm Here


Recently I've taken the whole engineer-as-artist thing a little seriously, so I've started reading industrial design, typography, modern art and web design blogs. I think it's made me broaden my horizons a little to get a fresh perspective on "design", and what it means to create. I'll post the coolest ones once I've had time to live with them.



This leads to my random reason for coming back to post, which is a font I made. It's a bitmapped, 10-point font that you can "design" yourself and auto-generate to .ttf online here. Mine is called "NewGothic", and was based on a typeface called "from Gothic" in Samuel Welo's 1935 edition Studio Handbook: Letter and Design for Artists and Advertisers. It's actually a really cool book that I picked up before I got on this design trip, since it was this neat 1935-printed book for $5 or something. I loved the pages and binding, and the concept of hand-lettering and drawing posters seemed quite foreign to me! Glad I picked it up in any case.

Monday, December 10, 2007

Been A While

It has indeed been a while. Just a quick post, because I thought I should actually contribute things here more often, and also thought I had something useful that other people might borrow and extend for free.



What I've written is a quick little AppleScript script that takes your currently selected text file, and "un-gutenbergizes" it. What I mean is that it removes all those senseless newlines they put into Project Gutenberg ebooks, and gives you back a text file with paragraphs that actually wrap! It's the only practical way to view ebooks on my new iPod Touch and/or Tofu on my Mac, which is an excellent text viewer and "columnifier". I've read entire books with my macbook sitting on my chest, lying down in bed, with Tofu. I think it's truly the next gen of readable ebooks, and we need an iPod/iPhone port!



For those interested in actually using the script, there are caveats since I don't really USE applescript (more on that next time!). First of all, it has a giant bug that means you must run it "indirectly". It only works if you select your file, then run it from your scripts menu on the menu bar. Double-clicking on the script file app itself and/or just dragging your text file to it does not work. Don't know why. Also, you WILL need TextWrangler installed, as that is how I automagically replace \n's with spaces and keep \n\n's the same.



As for a bullet-proof, drag-and-drop, stand-alone Cocoa app that does the right thing, that is coming soon enough. It really won't be much more coding than I used in the AppleScript, but it's more time than I have in between exam studying-periods. I wish they made a C-syntax language that let you use all the scripting hooks; I HATE AppleScript! Oh wait, they put that in Leopard with the beautiful, beautiful scripting bridge. I officially [heart] Leopard just for that! Oh, and free garbage collection too!



Also I just realized that there's no actual way to upload real FILES to a blogger.com blog, so let's just pretend I never offered a buggy AppleScript app in the first place, kay? A real developer (such as yours truly) wouldn't do that! So until I write the new code (and find a free host for my files), enjoy some nerdy science lolcats.

Tuesday, September 18, 2007

Back to School!

Well here I am in Kingston, Ontario, for another year of computer engineering. My mac's been out of commission in one way or another for about a month now, since they couldn't complete the repairs at home and I had to begin the process anew at an Apple dealer here. In that time, Cocoa has again started becoming a distant memory, but I felt I should be posting something of interest here. Starting tomorrow, I'll be updating this blog more regularly with personal posts that will remain in the spirit of mac programming, and of interest to readers (I hope).

Thursday, August 23, 2007

On Linux

While my MBP is in the shop, I've been relegated to using my old spare-parts-built AMD box with an install of an older Fedora distribution. This was a relic from my first year of university, where I decided to do some Linux experimentation. I tried a few distros, and was satisfied with all of Fedora's built-in apps. I loved how my computer didn't ever crash or pop up useless error boxes (The Automatic Update Warning icon that wouldn't leave my tray drove me insane!). I managed to cope with alternative programs, and even found that Matlab would run faster and more stably on linuxs!



And then the tweaking started. Linux is a bad idea for people like me, who are both perfecionists and fairly technically inclined, or at least willing to learn. One simple error or missing library could lead to hours of searching and updating and installing, ad infinitum. That doesn't even count the simple graphical and UI tweaks. It is actually much more productive for me NOT to have so many options.



Even today, I found myself customizing my setup of Puppy Linux, adding in the fluxbox window manager, customizing the menus, and configuring the sound card settings. These demonstrate what really drove me to the Mac in the first place:



  • I was messing with the sound card configuration because Puppy would not find or use the much higher quality soundblaster installed in my system, preferring to use the crappy motherboard sound chip that has a very high noise level.


  • Even after installing the ALSA sound config tools, I could still not get the card to work, so I'm now stuck with annoying bad sound on a computer which is my only source of music.


  • Did you notice I said I was using Puppy Linux? It's a great live-cd distro that runs completely in memory, very snappy and efficient. I use it because my regular Fedora 5 install is having very strange internet problems, probably associated with some weird DNS configuration that I can't find. Some sites will load, and gaim will log in, but most sites are stuck in the perpetual "Looking up www.site.com" state. Without web access, a computer is mostly useless to me.


Some might say that the inoperability of the sound card, internet, etc., are my fault and that I could have sovled these issues if I was smart enough. I agree that I could have fixed these issues with enough research, twiddling and effort, but should I really have to in a modern operating system? Add certain insurmountable hardware issues and the incessant installing of required libraries for each and every program, and you get mostly frustration, hence my conversion to everything Apple.



I sometimes miss the customizability of, well, everything of a Linux box, but I have been very satisfied with my Mac experience, and am instantly reminded of the "Apple Way" every time I use another system. I really don't mind spending the money on an OS that does things in a more unified, elegant and comprehensible way. Besides, let's estimate my time is worth $25 an hour. I know I could not build a Linux setup equivalent to OS X in 5 hours, so it's economically more feasible to go with the Mac anyways.



If anyone actually reads this blog yet besides me, and also happens to be an OSS devotee (why are you on a mac development site?), please no flames in the comments ok? The use of an OS is a personal choice, just as is the choice of a watch, car or hair style. There are options everywhere, and I believe that everyone must make the choice that suits them most. Stop making software choice a religious crusade!