tag:blogger.com,1999:blog-55631061491499111492024-02-19T20:39:32.334-05:00Happy Coding of a Happy Code MonkeyHappyCodeMonkeyhttp://www.blogger.com/profile/18054380211647467224noreply@blogger.comBlogger58125tag:blogger.com,1999:blog-5563106149149911149.post-61201971937489880272011-02-22T21:42:00.003-05:002011-02-22T22:13:21.913-05:00Brussel Sprouts!This will be my first, and hopefully not only, blog post on food, because I love food and recently (thanks to my CSA box) my love of cooking has blossomed almost out of control. <br /><br />Tonight I undertook the heretofore impossible task of cooking edible brussel sprouts. Mostly because they came in the CSA box and I hate wasting perfectly good CSA veggies. Oh, and I had eaten on raw recently, and yeah. They're awesome. <br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOYEgXn3UeXE2SoE291rVDnD1KvgSteRC6cBDJN85U-YDFdSSHi9iukm9SpYWp2SV5IjZnv4erdLBEyU4x7PrJhYWgoCo43loTY4H6-eEAFVAeqBDS18AL_7hXNweDRWAtafpj0fguvbK9/s1600/1298427547790.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOYEgXn3UeXE2SoE291rVDnD1KvgSteRC6cBDJN85U-YDFdSSHi9iukm9SpYWp2SV5IjZnv4erdLBEyU4x7PrJhYWgoCo43loTY4H6-eEAFVAeqBDS18AL_7hXNweDRWAtafpj0fguvbK9/s320/1298427547790.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5576716560716475666" /></a><br /><br />yeah, that just happened.<br /><br />However, if this is indeed the case, why is it that so many people consider them decidedly NOT AWESOME? My totally awesome theory is that, besides the obvious "YUCK VEGGIES YAY MCDDONALD'S" conditioning we all go through as American children, the very simple fact of the matter is that most people just really don't know how to cook veggies. This is not meant to be disparaging, as I'm sure all your mothers were a Saint, but how many of you as children ate canned veggies prepared in exactly the same way as a side dish to the meat? Sure, steams green beans are good, but you had the same green beans every time you had pork chops. <br /><br />Part of this has to do with the desire for consistent food, the primary reason why people will eat at McDonald's when they're traveling. This also, in my mind, contributes to the reason why meat is so popular in the first place (beyond the fact that it's technically a cheap luxury item)...you can cook meat 100 different ways and still be able to tell what kind of meat it is, for the most part. <a href="http://www.salon.com/food/francis_lam/2011/02/17/creative_vegetable_cooking/index.html">(Good article that touches on this subject).</a><br /><br />Besides that, learning how to cook vegetables well is very much a matter of knowing not only a wide variety of cooking styles, but to be able to juggle a variety of spices. Both of these require experience, which requires both time and money, both of which many people are in short supply of. <br /><br />The solution? No idea. Though the WSJ prediction in <a href="http://online.wsj.com/article/SB10001424052748703293204576106072340020728.html">this article</a> of meat becoming an expensive luxury item in the future will likely help.HappyCodeMonkeyhttp://www.blogger.com/profile/18054380211647467224noreply@blogger.com1tag:blogger.com,1999:blog-5563106149149911149.post-63475496547733284232011-02-08T12:40:00.003-05:002011-02-08T13:19:14.742-05:00More OS Tutorials and Motivation<a href="http://www.osdever.net/tutorials/index">http://www.osdever.net/tutorials/index</a><br /><br />One word: awesome. I'm going to try and spend some time working through these articles in my free time. I've always been interested in OS development but never felt like the topic was that approachable, but things like this and the MikeOS tutorial I talked about before have completely changed my mind about this. <br /><br />Related to this train of thought...I've been powering through <i>Outliers</i> by Malcolm Gladwell. This book is incredible. If you haven't read it, read it. It does a great job of destroying the misconception that successful people just have their knowledge and skills beamed into their head, which is something I still have to tell myself regularly to this day. <br /><br />Another great link: <a href="http://www.ted.com/talks/christopher_mcdougall_are_we_born_to_run.html">http://www.ted.com/talks/christopher_mcdougall_are_we_born_to_run.html</a>. This is one of the best TED Talks I've seen in a while, mainly because it very neatly distills the appeal of participating in AustinH3. It also makes me a bit sad at how far we've come from what our bodies are built for, despite all the amazing science and technology we've achieved. But that's a train of thought for a deeper mood.HappyCodeMonkeyhttp://www.blogger.com/profile/18054380211647467224noreply@blogger.com1tag:blogger.com,1999:blog-5563106149149911149.post-29265718713789094272011-01-26T18:15:00.002-05:002011-01-26T18:43:59.748-05:00Sneaky, Ninja C++Last night I did a few more problems out of <i>How Not To Program in C++</i> and really liked the last one I did before I went to bed. Apparently in C++, when you have a base class and a derived class, defining a function in the derived class sets *ALL* the functions of the same name to hidden in the base class, no matter what datatypes said function takes as an argument. I loved this problem, it was such a sneaky specification! Every time I do a problem out of this book I'm delighted by all the obscure little compiler rules and datatype issues the deceptively simple programs illustrate. Just out of curiosity, I whipped up a similar program in Java, and it seems to have a similar problem; in fact, the compiler gave me an identical error, which was amusing. <br /><br />Anyway, besides amusing myself with trivial C++ exercises, I've started reading <i>In the Miso Soup</i> by Ryu Murakami for the second (or maybe third?) time. I was interested in reading it in college, but a friend of mine had divuldged what I felt to be the entire plot, so I was frustrated enough to avoid it until recently, when I decided it was ridiculous to not read a 200-page, well regarded book just because I knew part of the plot. I mean, if that were the case, why bother reading any of the classics I enjoyed so deeply? Who doesn't know the plot of <i>The Odyssey</i> already? So I picked it up from the library, and so far I really enjoy it, though I feel at times the translation may not be amazing...some of the writing just feels forced or stilted. Maybe it was intentional though, I'll have to read more on the author. <br /><br />Signing off for now.HappyCodeMonkeyhttp://www.blogger.com/profile/18054380211647467224noreply@blogger.com1tag:blogger.com,1999:blog-5563106149149911149.post-43823327237901791912011-01-24T04:19:00.000-05:002011-01-24T17:19:58.269-05:00Update on the Resolution ThingUnfortunately, as I expected, I haven't been able to keep up with my resolutions. I'm still working on my third (formally second) book (about 84% of the way through, almost there...), and I haven't been keeping up with Project Euler at all. C'est la vie. I'm hoping to make some headway on both this week. <br /><br />In the meantime, I've started working with the Android platform, which is exciting and engaging. It will be a good base for a personal project I've been thinking about for a while, as well as allowing me to work with Java again, which is always a treat. Not that I'm a huge fan of Java, but being out of school certainly changes your perspective on how "hardcore" you need to be! I will forever tell anyone who will listen that spending your time learning all the low-level magic is absolutely worth it, but it's nice to let your hair down and have a little fun with a slightly higher-level programming language once in a while, especially one you haven't dabbled in for a while. <br /><br />Anyway, back to work.HappyCodeMonkeyhttp://www.blogger.com/profile/18054380211647467224noreply@blogger.com0tag:blogger.com,1999:blog-5563106149149911149.post-60795960159971997082011-01-21T16:12:00.002-05:002011-01-21T16:16:35.393-05:00Book #2, In far more than a weekI finally finished my second book for my 52 book challenge, but only because it was a "GRAPHIC NOVEL" that was only about 80 pages. Ah well, at least I'm making up a little time. Still working on <i>Stories</i>, about 75% of the way through, but the going has been slow because it's very hard to find time to just sit and read, even though I'm finally starting to enjoy it as much as I did when I was a child. <br /><br />The second book was <i>Signal to Noise</i>, written by Neil Gaiman and some other guy who isn't Neil Gaiman for some reason. It was a descent story framed by beautiful illustrations; the story involved a film writer who was dying. Very nice, not necessarily easily digestible, but very quiet. Recommended.HappyCodeMonkeyhttp://www.blogger.com/profile/18054380211647467224noreply@blogger.com0tag:blogger.com,1999:blog-5563106149149911149.post-6430293950997651052011-01-19T15:48:00.003-05:002011-01-20T18:37:03.334-05:00Android Developing!Short post today, but I've started an Android project at work and I'm really enjoying working with the platform. I never bothered to approach it before, since I didn't have a smart phone at the time and I was never interested in general, but I wish I had started looking at it soon. It's very fun and rather intuitive, especially when using the Eclipse plug-in (me enjoying Eclipse? Apparently it can happen). After figuring out the basics, I'm excited to try and start working on a few personal projects for Android. Away!HappyCodeMonkeyhttp://www.blogger.com/profile/18054380211647467224noreply@blogger.com0tag:blogger.com,1999:blog-5563106149149911149.post-55441802074677508022011-01-13T17:21:00.004-05:002011-01-14T11:40:54.193-05:00Low-Level, Shmoe-Level<a href="http://mikeos.berlios.de/write-your-own-os.html">http://mikeos.berlios.de/write-your-own-os.html</a><br /><br />Yeah. That's what I'm doing tonight. Because seriously. <br /><br />Low-level is one of my many weaknesses, so things like this really appeal to me. Along with this, I've been working on getting through <i>How Not To Program in C++</i> and <i>Write Great Code</i>, in parallel, and it has been a wonderful surprise how well the two books compliment each other. I was reading chunks of <i>Write Great Code</i> on an airplane, and when I finally got back around to following the code samples in <i>How Not To Program in C++</i>, I realized I had JUST read a section that almost directly related to the bug in the sample program. Lovely! I can't express how beneficial it is to be reading a book outlining abstract low-level concepts, and go to another book that shows a real-world example of how these concepts play out in an actual programming sample. Sure, the samples are rather small and arguably trivial, but it's a base that I have been woefully ignorant in. Operating systems in particular is another area I need some edumacation in, so I'm hoping that once I work through this example, I'll be able to approach the O'Reilly Linux Kernel book I have sitting in my room right now. <br /><br />Here's to further education!<br /><br /><b>UPDATE:</b> I completed this tutorial last night in a highly distracted hour, and it was excellent. Clear, concise, with a great sample, and delivered exactly what it promised...a bare-bones, functioning OS. If this catches your interest AT ALL, work through it and download the MikeOS source code. Very satisfying learning experience.HappyCodeMonkeyhttp://www.blogger.com/profile/18054380211647467224noreply@blogger.com0tag:blogger.com,1999:blog-5563106149149911149.post-56129339017770089362011-01-06T11:36:00.002-05:002011-01-06T11:46:04.826-05:00When is it OK to "cheat"?As I mentioned, one of my New Year's resolutions is to try and get 1 Project Euler problem done per week. I should openly admit at this point that I have been painfully slow in solving even the easiest of the problems, and recently I've been stuck on Problem #3, which requires you to find the largest prime factor of a big number. I've been struggling to figure out the best way to approach it, and right now I have a program that literally loops through a list of prime numbers and prints them. Pathetic. <br /><br />So, in the interest of getting a different perspective, I Googled the problem. I felt uncomfortable doing this. I feel like I should be able to complete these problems with no help, if I just sit and think about it long enough, but obviously this was getting me nowhere. I found a solution that I'm going to implement that makes far more sense, is cleaner, and isn't pathetically brute-force like my current code. <br /><br />So, the question that lingers in my mind is, how important was it that I worked it out myself vs. looked up a blogged solution vs. just looked up sample code? At what point am I really just cheating myself in the interest of not having to think too much? Is it even that important in this case? <br /><br />I'm working on Project Euler to improve my shoddy math skills, as well as attempting to keep up with fairly basic programming (usually to learn how to use new languages as well, such as Lisp), so I suppose as long as I still accomplish those goals, it's all good.HappyCodeMonkeyhttp://www.blogger.com/profile/18054380211647467224noreply@blogger.com0tag:blogger.com,1999:blog-5563106149149911149.post-54607783235755750882011-01-05T16:00:00.000-05:002011-01-05T17:24:39.134-05:00On DistractionsI have a lot of trouble staying focused, largely due to the fact that I work on a nice computer with full Internet access in a very laid-back work environment. However, my lack of productivity is a constant source of frustration and stress, so I've been working on turning myself into a more focused, productive worker.<br /><br />I made three major changes in my work life that have made a massive difference. First of all, I cut my coffee habit cold turkey. Like, completely. It was less rough than I expected, especially since I'm still allowing myself to have a cup in the morning (before work, none during), and every once in a while I'll sneak a coke during lunch (I also drink tea all day). I noticed immediately, however, that I was far less irritable and distract-able. Besides that, I've freed myself from the caffeine roller-coaster that often resulted in frustration and many hours wasted.<br /><br />Next, I started keeping a Google Docs TODO list, that I keep open on my browser at all times. It doesn't necessarily keep me focused exactly, but it does allow me to get back on track when I do get distracted. The other benefit of the TODO list is that if I think of something I need to do that's not directly related to work, I add it to the list, rather than breaking my concentration and starting a massive Internet-tangent on a whim.<br /><br />The last step was to start running during lunch, which gives me the perfect chance to clear my head and come back to work refreshed and focused. Not much else to say about this other than that it works.<br /><br />Also, I'm only about 1/4 of the way through book 2, but I'm making great progress on it. Hope to have another "COMPLETED" update sooner rather than later!HappyCodeMonkeyhttp://www.blogger.com/profile/18054380211647467224noreply@blogger.com0tag:blogger.com,1999:blog-5563106149149911149.post-51035474979702017872011-01-04T17:07:00.002-05:002011-01-04T17:11:08.490-05:00Book a Week #1 Complete!Ok, so I cheated slightly and started with a book I was over half-way finished with. Sue me. Next up is Neil Gaiman's anthology, "Stories". It weighs in at a little over 400 pages, but I'm confident I'll breeze through it. So far the stories are pretty light reading (nice book to start the year out with). After that I'm planning to dig into Huxley's "Brave New World", which I bought recently.<br /><br />I wanted to post something about motivations and such but I'm not motivated enough right now to do so (oh-ho!). More to come sooner rather than later.HappyCodeMonkeyhttp://www.blogger.com/profile/18054380211647467224noreply@blogger.com0tag:blogger.com,1999:blog-5563106149149911149.post-86466494115837253452011-01-03T13:52:00.003-05:002011-01-03T14:04:38.914-05:00Book a Week, #1I missed posting this weekend due to being extremely busy, but I'm back and have started my book-a-week resolution by (almost) finishing <a href="http://boingboing.net/2010/09/20/how-becoming-a-stoic.html">A Guide to the Good Life: The Ancient Art of Stoic Joy by William B. Irvine</a>. I intentionally linked to the BoingBoing article where I first heard about this book; the author made a few guest posts on the site later that convinced me to buy it. I assume a quick search will pull up his posts on the site, they're excellent. <br /><br />The intention of the book is to not only introduce Stoicism, but provide a guide to becoming a practicing Stoic in modern times. Although I disagreed with the author on a few different points, I enjoyed the overall message of the book, and appreciated his effort to illustrate how living without a coherent philosophy of life is detrimental to our pursuit of happiness. <br /><br />The philosophy focuses on changing yourself and how you handle your own emotions and desires, rather than attempting to find satisfaction in things external to yourself. I've been working to decrease the negativity and anxiety I've spent my life dealing with, and I found a lot of his advice very helpful (and was pleasantly surprised to realize I was already doing most of what he suggested). <br /><br />After I complete this book, next up will be "Stories", a short fantasy story collection put together by Neil Gaiman and someone else whose name escapes me (links and so on when I start it).HappyCodeMonkeyhttp://www.blogger.com/profile/18054380211647467224noreply@blogger.com0tag:blogger.com,1999:blog-5563106149149911149.post-24666135776568769612010-12-31T19:14:00.003-05:002010-12-31T19:20:49.448-05:00Resolutions 2011I'm embarking on a project with <a href="http://soupcan58.wordpress.com/">a friend from Indiana</a> in which we decide on a maximum of 4 New Years resolutions and attempt to follow through with them by updating blogs every day and posting progress. One of the shared resolutions, besides attempting to blog more in an effort to become better writers, is to complete 54 books this year, essentially attempting to read a book a week. For myself, I'm going to attempt to complete at least one Project Euler problem a week, and I may even try to start playing some instruments again. It will be a challenge, but we're both hoping the blog and each other will hold ourselves accountable. <br /><br />Happy 2011!HappyCodeMonkeyhttp://www.blogger.com/profile/18054380211647467224noreply@blogger.com1tag:blogger.com,1999:blog-5563106149149911149.post-72607476791341507242010-11-02T21:52:00.002-04:002010-11-02T22:04:57.437-04:00All-Consuming WebI've taken on some new challenges, including rebuilding my personal web page, and, in the process, learning to become a better designer. At this point, unfortunately, this consists of learning how CSS works rather than graduating to a more philosophical discussion of what a "good" web design is. I know what kinds of web pages I like, but I have none of the required skills to make my own look the way I want yet. <br /><br />In the meantime, I'm going to have to do SOME project in C++...HappyCodeMonkeyhttp://www.blogger.com/profile/18054380211647467224noreply@blogger.com0tag:blogger.com,1999:blog-5563106149149911149.post-15470546670586325182010-10-27T22:09:00.002-04:002010-10-27T22:21:07.869-04:00The Political Programmer"You know, most programmers are libertarian", my workmate stated.<br /><br />"I know", I replied, attempting to imply in my tone of voice that I had met many of these abstract libertarian programmers my workmate spoke of. <br /><br />"It's because they think, 'Hey, I can solve this problem myself, I don't need any help!'". <br /><br />"Yeah, they're also massive assholes". <br /><br />I'm not a libertarian. I believe in giving as much help as possible, with the hopes that I'll receive some help in return. Maybe this makes me a bad programmer. <br /><br />I finally began to come to terms with the idea that, not only am I a *bad* programmer, it was very likely I would never become a decent, or even remotely competent programmer. I'll certainly never be the hackers I romanticize. But, really, this no longer bothers me. Now that I've thrown off the shackles of insecurity, I'm free to learn at my own pace, and I'm starting to REALLY enjoy it. I read whatever strikes my fancy, work on whatever personal projects excite me in my off time, and this has been an amazing turn-around. I'm not trying to get through that C++ book to become a C++ super-guru anymore, I'm just reading it because I'm enjoying it. I'm no longer allowing myself to be embarrassed by a lack of knowledge in any topic anymore, and as a result I'm free to learn more. <br /><br />If you find yourself becoming a slave to an ideal image of yourself, it may be time to re-asses that image and figure out if you really want to be that abstract that ideal, or if the ideal is what is really holding you back.HappyCodeMonkeyhttp://www.blogger.com/profile/18054380211647467224noreply@blogger.com0tag:blogger.com,1999:blog-5563106149149911149.post-40388457747677402512010-09-25T12:02:00.002-04:002010-09-25T12:24:46.040-04:00Redesigns to Blow Your MindSince I last posted, I have become gainfully employed by a web development company and have been so for the past 8 months or so. Both the Master's degree and the move down here seems to have paid off even more so than I had any right to hope or expect. Always a good story.<br /><br />In the meantime, I've become motivated to start working on a few personal projects again, primarily so I can keep the rust off my not-spectacular Java skills. Syntax is trivial, but it surprises me how easy it is to lose code design skills. In particular, I started a project with (apparently) the intention of using some sort of mediator pattern and, after not working on it for a few months, looking over the code again has made me cringe. The objects are working as both data containers AND UI controllers, which, due to the recent emphasis of MVC, and my own personal preference, seems like a Really Bad Idea(tm). So already, with not much code, I'm doing an overhaul. <br /><br />None of this is particularly enthralling, but it again illustrates how important a design phase before code writing can be, even if you're the only person working on the project. I'm ditching 7 source files due to a complete lack of planning when I started...if there was any planning, I certainly can't find it now.<br /><br />So, back to coding, and I hope to have a few functioning projects to write about soon.HappyCodeMonkeyhttp://www.blogger.com/profile/18054380211647467224noreply@blogger.com0tag:blogger.com,1999:blog-5563106149149911149.post-998120486602849352010-01-11T09:40:00.002-05:002010-01-11T09:48:59.247-05:00Time to Start Over...Sort of!So it's Monday morning and I'm starting my 3rd full day in Austin, Texas, after a harrowing 3-day truck-based move. So far I'm loving it here, oh so so much, and I've started my job hunt anew. I wasn't having any luck applying from Indiana, so I'm hoping that my Austin address will help a little. So far I've applied for 3 different IBM positions, and a few others. I'm excited and scared, but the risk should turn out to be worth it :) <br /><br />An exciting fact about Austin is that it has a lot of LUGs, which will be great for meeting new people and being able to keep up on all things Linux. Hoorey! <br /><br />Off to the future.HappyCodeMonkeyhttp://www.blogger.com/profile/18054380211647467224noreply@blogger.com2tag:blogger.com,1999:blog-5563106149149911149.post-50501115287912806942009-12-14T23:04:00.002-05:002009-12-14T23:23:15.620-05:00A Good Programmer?I came across <a href="http://www.inter-sections.net/2007/11/13/how-to-recognise-a-good-programmer/">this blog post</a> via Hacker News tonight, and it gave me a little food for thought. <br /><br />I should know better, of course, than to just take stuff like this as gospel truth, but I hear it a lot from people like Jeff Atwood, who make their living talking about programming. To be a "good" programmer you need to be the kind of person who just loves it, and does it all the time. <br /><br />The second one I don't know that I agreed with too much, mostly because I know plenty of people who talk up "bleeding-edge" technologies who are only talking them up because they're bleeding-edge, and couldn't even begin to actually program in it if they wanted to because they lack even the most basic skills. This is primarily what I run into with kids singing the praises of the latest Microsoft technology (not to piss on Microsoft technology necessarily, but there's a reason for that). However, taken with the rest of the list, it's a little more understandable. I'll still hold on to my dreams of kernel hacking, though. ;)<br /><br />The one that really hit me in a tender area was the last one..."If your potential programmer didn’t do any programming before university, and all his experience starts when she got her first job, she’s probably not a good programmer." Ouch. That describes me almost to a T. Granted, I started programming in my undergrad career while pursing another degree, and the Master's was technically an extension of a "hobby", but before that I had never done any programming. In CS 120 I had to go to my professor's office for help because I didn't know what FTP was. Yes, it was that bad. <br /><br />I had no access to any resources to even begin to understand how to do it, and didn't know what to look for anyway. It has been the primary source of my low self-confidence in my programming ability the entire time I have been attempting to make the computer bend to my feeble will. Even now, when I know I've improved so much, I still never feel like I've worked hard enough or dedicated myself enough to improving my skill. I've tinkered with a wide variety of languages but am still very much a C++/Java person. <br /><br />Anyway, expressing my insecurity is not particularly helpful...I'm off to start reading more books and working on more projects.HappyCodeMonkeyhttp://www.blogger.com/profile/18054380211647467224noreply@blogger.com0tag:blogger.com,1999:blog-5563106149149911149.post-88016366013050091262009-12-12T11:18:00.003-05:002009-12-12T11:24:07.575-05:00Two Changes!I've moved my portfolio page to <a href="http://sites.google.com/site/codemonkeyinc/">CodeMonkeyInc on Google Sites</a> because, frankly, I am fully capable of writing a website backend, but I couldn't design my way out of an empty pool. Not to say I haven't tried really hard, but I lack the requisite skills in terms of creating backgrounds and other important images that look clean and professional, rather than like I made them up in Gimp after dicking around for a half hour. Also, I have yet to actually BUY hosting, so my iweb account will be going down after I graduate anyway.<br /><br />The other thing I did this weekend was post a few of my person projects to <a href="https://launchpad.net/~happycodemonkey">Launchpad</a> so I could show them off on the portfolio page. Right now my projects on there aren't extremely impressive, but <a href="https://launchpad.net/scribblemidi">ScribbleMidi</a> is coming along really well, and I'm anticipating having a semi-working system soon. Launchpad is a wonderful, free way to publicly post your open source projects.HappyCodeMonkeyhttp://www.blogger.com/profile/18054380211647467224noreply@blogger.com0tag:blogger.com,1999:blog-5563106149149911149.post-11714631765927011472009-12-06T16:34:00.006-05:002009-12-06T20:09:22.630-05:00Battle With the PHP Script From HellIn seminar class we have to write a script that takes in a gigantic (3.2MB) text file data dump, parse the data out, and insert it into a MySQL database for an application we're working on. The first pass was done by a classmate, and although it got the job done quickly (averaged around 13 seconds), the other requirement was that the script be easy to modify by non-programmers, and this was not even remotely easy to modify (it took me a half an hour to add one line). So I took it upon myself to rewrite the whole thing, and so far the result has been an interesting exercise. <br /><br />Problem 1: The data is delineated by XML-style tags, but is not in an XML structure. <br />Problem 2: Some of the records (collections of data that represent one art piece) are invalid, as they just describe different image file names for a single art piece.<br />Problem 3: Some of the data is unique (such as the style, technique, etc), and the values are often in a list separated by semicolons.<br />Problem 4: The current version of my rewrite takes well over 400 seconds to run.<br />Problem 5: I had pretty much a weekend to write this. <br /><br />The data dump and the way the records are structured is unavoidable. I approached the problem by reading in one record at a time and passing it through a series of functions to pull out the appropriate values, then inserting them into the MySQL database. It does this one query at a time, however, which I suspect is part of the problem. <br /><br />The first step in improving is exploring the REPLACE function. I'm currently running a query that checks a table if the current values exists, otherwise it needs to be added in. Making these required entries unique should remove the need for these extra queries.<br /><br />The result? Down to around 330 seconds, not as bad. The primary keys are a little screwed up, as expected, but since it's an auto-incremented number, it isn't a huge deal.<br /><br />At this point the primary bottleneck is in the bridge tables. Here's how this works: all the bridge tables simply connect an art piece with its corresponding style, technique, etc. So there's a style table, which is only a list of styles, but we need to take the artID (one select query), then select the corresponding styleID, and put them in one table. This wouldn't be so bad except it's 2 queries in a row for each of the tables; that's a lot of individual queries. <br /><br />**Note: at this point I realized I made an extremely stupid error and kept adding onto the records array rather than clearing it after each record was processed *facepalm!*<br />Fixing that major leak got the script down to 131 seconds.<br /><br />After making a huge difference with the array I managed to cut it down even more by fixing the art table creation. This function was using two different queries to build the table, which was unnecessary. It's now running at around 16 seconds!<br /><br />Right now I'm pretty happy with where the script is at, so I'll save the optimization of the bridge tables for later.HappyCodeMonkeyhttp://www.blogger.com/profile/18054380211647467224noreply@blogger.com0tag:blogger.com,1999:blog-5563106149149911149.post-66855423274324610652009-11-18T00:46:00.003-05:002009-11-18T00:48:09.651-05:00Linux in MediaI know for a fact that a lot of Sci Fi original movies use Linux in their computer scenes (one of them was really, really, obviously Gnome desktop, which made me extremely happy). it's free, doesn't violate any copyrights, and allows the movie makers to customise the look of it so it can look suprar scientific. I wonder how much media actually uses Linux for their "fancy tech computer" scenes...or if most of them just use a flash movie or what...HappyCodeMonkeyhttp://www.blogger.com/profile/18054380211647467224noreply@blogger.com0tag:blogger.com,1999:blog-5563106149149911149.post-62884813820300987492009-11-12T18:31:00.003-05:002009-11-17T19:41:58.909-05:00World Usability DayI went to World Usability Day down at IU and was really impressed, that was a fantastic conference. Very, very, very small, but gave me a lot to think about and didn't put me in a grouchy mood. No one there expect myself, Dr. Gestwicki, and Austin were programmers, which made us feel like outsiders in a sense, but we all still gained a lot by going and enjoyed ourselves quite a bit. <br /><br />The highlight of the conference was definitely Rod Collier, the guy who designed the Letterman Building here at Ball State. His presentation was both informative and interesting, his PowerPoint was amazing, and he gave some fantastic examples of innovative design in his own home (which he designed himself!). <br /><br />Unfortunately I didn't get a good sense of what everyone was thinking of when they were talking about design and usability...I guess it was just physical objects...but most everyone there avoided the topic of computers like the plague (even the guy who worked for Tuitive, which designs web-based apps and webpages for clients). This was unfortunate, since CS could use more good usability people. <br /><br />Another refreshing aspect was the attitude; everyone there obviously knew what they were talking about, but didn't seem to be wallowing in their own sense of self-importance, which was extremely refreshing...I felt like this was due to the fact that these people are professionals, working for real clients, rather than a group of artists, which really makes an enormous difference. <br /><br />It also encouraged me to get a better design sense...I still have a lot of work to do in that regard. Especially since one of my interests is web design, this will be an essential skill. Unfortunately I'll always be a struggling outsider, because I don't fool myself into believing for a minute that design is something people can just "pick up". The amount of studies done on usability, the ridiculous amount of unusable systems, and the amount of money companies will spend on design are all obvious proof that design is another "this isn't as easy at it looks" area, but on the plus side, I'm far more aware of it now than I ever was before. <br /><br />Now, if you'll excuse me, I'm off to redesign my website again :)HappyCodeMonkeyhttp://www.blogger.com/profile/18054380211647467224noreply@blogger.com0tag:blogger.com,1999:blog-5563106149149911149.post-60752551133373678822009-11-12T18:11:00.002-05:002009-11-12T18:31:18.338-05:00Surface Project Success!!!I meant to post this WAY earlier, but I've been unbelievably busy. The Surface project was a great success! It didn't crash, people seemed reasonably interested in it, and we made some very interesting observations. <br /><br />Primary observations of interest:<br />1) People didn't seem aware of what the navagation bar was. They would mess around with the cards already on the table rather than interacting with the navigation bar. <br />2) They kept trying to resize the cards (totally understandable)...we'll need to build in a flexible resize function for all the UI elements if there is any continued work on this project.<br />3) They "accidentally" discovered the flip function. Again, there needed to be an obvious visual cue for this.<br />4) They kept trying to interact with their own names, which was, in retrospect, a completely obvious interaction we neglected to take advantage of due to time constraints. <br /><br />We're going to start going through the data soon, which will also be extremely interesting. More to come!HappyCodeMonkeyhttp://www.blogger.com/profile/18054380211647467224noreply@blogger.com0tag:blogger.com,1999:blog-5563106149149911149.post-51578885310940161482009-11-05T12:58:00.007-05:002009-11-05T13:08:53.691-05:00Brief UI PostI installed TweetDeck today just to check it out:<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOIcuc9ILhmAptNRK0kSydlhO04YziVYIVLjtHD_mxT-Rr_nUn4yU9gsPNZbgnHEeLtiSDGZLGNyeNWyoY2cQrLloNheu1nxGi9GIqPVCrN-pfZdLNCNmK17EML-M0axJk5GRSpKpn-dN0/s1600-h/TweetDeck.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 200px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOIcuc9ILhmAptNRK0kSydlhO04YziVYIVLjtHD_mxT-Rr_nUn4yU9gsPNZbgnHEeLtiSDGZLGNyeNWyoY2cQrLloNheu1nxGi9GIqPVCrN-pfZdLNCNmK17EML-M0axJk5GRSpKpn-dN0/s320/TweetDeck.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5400681844525618034" /></a><br /><br />Oh. My. God. Why. This is easily the worst UI design I've seen in a while. What do all those little icons do? I have no idea until I hover over them with the mouse. Why so much noise? I can't even tell what I'm freaking looking at.<br /><br />And don't get me started on the Growl integration:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZz1X1VcpWCAakYRp-JcMonxRpNrAh8JF2TuIlxck6YOBK_YT4R7rextQQVVrka0L_SKPlS7GFaLYS7SXaYSNjAs6zfOFys3ZHV4jUDqkqVZk8ANfTxzRd7czg6hakE4y7JBg890I1JFq7/s1600-h/TDGrowl.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 200px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZz1X1VcpWCAakYRp-JcMonxRpNrAh8JF2TuIlxck6YOBK_YT4R7rextQQVVrka0L_SKPlS7GFaLYS7SXaYSNjAs6zfOFys3ZHV4jUDqkqVZk8ANfTxzRd7czg6hakE4y7JBg890I1JFq7/s320/TDGrowl.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5400682170532369010" /></a><br /><br />Yeah, that's attractive...takes up a ton of screen real estate, makes an annoying sound, and doesn't conform to my Growl theme (quick toaster pop-up along the bottom). <br /><br />I hate, hate, hate cluttered UI designs that take up more space than they deserve. If you can fit all your content into a thin column, you make the application the size of said column. If you need more of these content windows, there's this concept call tabs. Nothing that only takes 140 characters to display should EVER take up my entire desktop real estate. <br /><br />To be fair, I'm a stickler for clean desktops. As should be obvious:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqUkMkareUFDpHPz07XPpHrMyy9Wb3x_g57KBcbIkrb2ENRtVY9xlMi7kc-k2XiR-22nEFfxdwo9qGpeX2irVMPeGLqwPXB9-oa5AVJYcKwzmYwbqZSrpYDYTjqSsw96axe5PRitFs3nym/s1600-h/Desktop.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 200px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqUkMkareUFDpHPz07XPpHrMyy9Wb3x_g57KBcbIkrb2ENRtVY9xlMi7kc-k2XiR-22nEFfxdwo9qGpeX2irVMPeGLqwPXB9-oa5AVJYcKwzmYwbqZSrpYDYTjqSsw96axe5PRitFs3nym/s320/Desktop.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5400682972867055314" /></a><br /><br />So I'm definitely biased. But I have trouble viewing something like that as usable. Need to do more research on this topic :)HappyCodeMonkeyhttp://www.blogger.com/profile/18054380211647467224noreply@blogger.com0tag:blogger.com,1999:blog-5563106149149911149.post-71216868752589123552009-10-29T12:16:00.003-04:002009-10-29T12:18:02.673-04:00Screenshot of the Latest Build<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsHHShuqDSaUz8u6_5YaZWDgounQEnHoB57cSnUKFf1WGRIX0x0WAlu8QvLvMRDBk2_xuixyA50O0B3oArmd74CMp_6UmB6On1ItXKn1zMIhyUztZXnZ_2ymcmLVxlxAb55ZyAw16g9_fr/s1600-h/screenWithNewDataOriginal.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 266px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsHHShuqDSaUz8u6_5YaZWDgounQEnHoB57cSnUKFf1WGRIX0x0WAlu8QvLvMRDBk2_xuixyA50O0B3oArmd74CMp_6UmB6On1ItXKn1zMIhyUztZXnZ_2ymcmLVxlxAb55ZyAw16g9_fr/s320/screenWithNewDataOriginal.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5398056709060425570" /></a><br /><br />I've been running into a lot of challenges with the layout, but it's starting to look really nice.<br /><br />One weird thing about the controls is that they will always overlap each other...not the best behavior, so I need to either look into Grid layouts or see if there's just a "Overlap = false" or something.HappyCodeMonkeyhttp://www.blogger.com/profile/18054380211647467224noreply@blogger.com0tag:blogger.com,1999:blog-5563106149149911149.post-48144148179171420222009-10-28T23:01:00.002-04:002009-10-28T23:04:32.160-04:00Brainf*ck!Another project I dug up today while I was doing a Qt tutorial for my Open Source class, a <a href="http://cmarnold2.iweb.bsu.edu/Qt/bfsource.tar">small Brainfuck interpreter</a> with a slick GUI. Qt is a fantastic graphics toolkit, and although I love Gnome, I'll probably end up doing other GUI projects in Qt...haven't bothered to take the time to learn GTK+ yet afterall. :)HappyCodeMonkeyhttp://www.blogger.com/profile/18054380211647467224noreply@blogger.com0