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!

Fate?

So I am currently mac-less, as Sunday evening when I opened the lid on my Macbook Pro to awaken it from sleep, the display flickered on once and then stayed off. After a hard shut-down, it would only make scary looking flashes in the corner of the screen when powering on, without even getting to the Mac boot sound. Needless to say, I was scared.



So when I brought it into the local Mac repair shop (No apple stores within hours of my home), I was ecstatic to hear the boot sound and see the login screen, albeit with a flashlight. Turns out resetting the PRAM is a more powerful incantation than I'd ever realized! Pat, the very nice Mac guru of the shop, said they'd have a replacement backlight in lickety-split and hopefully even the new keyboard replacement as well.



The keyboard is an issue I'd rather not get into, suffice it to say that my up and right cursor keys no longer function. This makes coding fairly annoying, but the display issue is actually much more disappointing, as this screen was actually only put in a couple months ago. The original had been making progessively louder buzzing noises after waking from sleep, and it had been replaced with a shiny new display from Apple. I'm actually disappointed by these quality issues in the hardware, since this is my first macintosh, but I've at least been reassured to know that Apple hardware service is relatively prompt and painless.



Needless to say, I have purchased the AppleCare Protection Plan.

Monday, August 13, 2007

Actual Programming!


Ok, so It's been just over a week since I began this blog. What have I accomplished? Well, I've gotten over a cold, learned that peaches and cinnamon were made exclusively for inclusion in chicken pot pies, and finally broke out my copy of Aaron Hillegass' Cocoa Programming for Mac OS X to continue learning the beauty that is Cocoa.



I've had quite a long sabbatical from this standard Cocoa beginner's tool, but I'm finally making my way through Chapter 7 and figuring out the Undo Manager. Woohoo! Now that I'm back on the train, I'll start fleshing out my current projects. One is going to be a dead simple, elegant and FREE money manager. Nothing to replace the more advanced programs out there, but enough to quit using a friggin spreadsheet! This project was born out of my frustration of, well, using a spreadsheet. The second project is a bit neater, and uses a slightly more diverse set of tools to get its job done.



It's a text-to-speech converter, mainly for converting ebooks into audiobooks that I can listen to on my iPod. The beauty is its integration with iTunes, using a bit of AppleScript to automatically tag the files and convert them into a low bitrate. My next step is to rework the splitting algorithm, which was initially "borrowed" from Matthew Russell's DIY iPod eDoc Reader Tutorial posted on the O'Reilly Mac DevCenter site. Finally, I hope to unravel iTunes' inner workings to add these files to the Audiobooks section of the iTunes library. Someday, I may even extend this program to read RSS feeds and sync new ones to an iPod as a podcast.



That's all for today, cheers.

Wednesday, August 8, 2007

You're making me dizzy!

So in the next few days/weeks/months, this blog will undergo incremental changes in style. I'm very much a perfectionist, so I'll keep experimenting with different colour and font combinations until I find a very nice compromise. Eventually I hope to develop my own unique style sheets, but let's not jump the shark.


In design, I appreciate elegance and simplicity. A great example is something like John Gruber's Daring Fireball, but John I swear I'll try not to copy you outright! To my (obviously growing) audience: please bear with me as I perfect optimize your web experience.

iMac Day

So yesterday Steve Jobs made me wish I could quit school to afford a 24" iMac (well not really, but my 1G macbook pro is starting to show it's age). One thing that's got me really excited is the new keyboards. I absolutely adore the low-profile keyboard of my mbp, so responsive and precise, and have always wished my USB apple keyboard felt the same.


Now I just need to find an excuse to spend another $50 on a keyboard, when I'm about to spend another $300 on OS X/iWork/iLife upgrades in the next few months. Being a poor student blows (in case no one ever told you).

Sunday, August 5, 2007

this is me


Hello to anyone who might be reading my new blog!



My name's Jason, and I'm a Computer Engineering student up in the great cold country of Canada. Well, at this time of year, at least the beer is cold. There. No further clicheed canuck jokes required.



I'm starting this blog to document my debut in the brave new world (to me, at least) of computers and the internet! I've always been fairly techno-savvy, but I'm only now learning software development, web design, and all those little hacking skills that accompany them.



I have a little experience with other environments, but I've just begun to learn Macintosh app development and that'll be the main focus of this blog. I'll keep you updated on projects I'll work on, and little tips for other newcomers. I'm also kinda fooling around with web development, so I might just drop a few tidbits on my progress here and there.



I intend this blog to be a tool, to force myself to work on projects regularly. If I get lazy, there will finally be consequences in that I'll have nothing to post. But if you happen to derive any use or satisfaction out of this little experiment, all the better to you!