{"id":338,"date":"2008-12-03T00:22:45","date_gmt":"2008-12-03T04:22:45","guid":{"rendered":"http:\/\/itp.indiamos.com\/blog\/?p=338"},"modified":"2009-04-14T01:12:29","modified_gmt":"2009-04-14T06:12:29","slug":"baby-steps","status":"publish","type":"post","link":"https:\/\/itp.indiamos.com\/blog\/2008\/12\/03\/baby-steps\/","title":{"rendered":"Baby steps"},"content":{"rendered":"<p><a href=\"http:\/\/itp.indiamos.com\/ICM\/final\/parse_Krylon_colors\/applet\/index.html\"><img loading=\"lazy\" src=\"https:\/\/i1.wp.com\/itp.indiamos.com\/blog\/wp-content\/uploads\/2008\/12\/krylon_palette.png?resize=400%2C355\" alt=\"grid of 61 colored squares\" title=\"Krylon color palette\" width=\"400\" height=\"355\" class=\"alignnone size-full wp-image-340\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>This is the second smidgen of the code for our final project. <a href=\"http:\/\/itp.indiamos.com\/ICM\/final\/parse_Krylon_colors\/applet\/index.html\">It<\/a> pulls RGB values and color names from <a href=\"http:\/\/itp.indiamos.com\/ICM\/final\/parse_Krylon_colors\/data\/Krylon_colors.txt\">a tab-delimited text file<\/a> (which is, itself, based on the <a href=\"http:\/\/www.krylon.com\/products\/indooroutdoor_paint\/\">actual Krylon color options<\/a>) and outputs this grid of swatches. The swatches don&#8217;t <em>do<\/em> anything yet&#8212;just drawing them took me, like, two days, thank you very much, and that was <em>with<\/em> some very helpful help from Shawn. Partly this is because I apparently can&#8217;t keep in my head for more than thirty seconds how arrays and objects work, and partly it&#8217;s because I just. can&#8217;t. focus. And partly it&#8217;s because I apparently have no idea what the fuck I&#8217;m doing.<\/p>\n<p>I&#8217;m beginning to really like Diego&#8217;s Plan B, as proposed over the weekend: <\/p>\n<blockquote><p>\n\tFake our own deaths.\n<\/p><\/blockquote>\n<p><!--more--><br \/>\nI keep telling myself I have to not panic and just write the code one piece at a time. Then, later, I can get somebody to help me put it all together, which is something I <em>know<\/em> I have no clue how to do. But just accomplishing what seem like they should be simple things is stumping me. Most recently, I was trying to get the swatch name to be displayed when a square is rolled over. This is not by any means an important feature&#8212;in fact, it doesn&#8217;t really serve any purpose. But I <em>should<\/em> be able to do it, and I can&#8217;t figure out why it doesn&#8217;t work. I keep getting errors like &#8220;The function showName() does not exist&#8221; or &#8220;Cannot find anything named &#8216;swatches.'&#8221; Both of these things do, of course, exist, and I can&#8217;t see any reason why they wouldn&#8217;t be found.<\/p>\n<p>I know it&#8217;s pretty rare for computers to just <em>fuck up<\/em> and much more common for <em>me<\/em> to do so, so I&#8217;m sure the answer is that I&#8217;ve done something really dumb and sloppy somewhere. But it could easily take me two hours to find that error, and every new goddamn line of code seems to cause some new mysterious issue. I can feel myself growing older just thinking about it. And there are a lot more lines of code to go. Here&#8217;s the stuff I was hoping to get done, oh, by, say, last Thursday: <\/p>\n<div style=\"background-color:#333; padding:10px;\">\n<h3>Graffiti Glove Components<\/h3>\n<h4>Brush selector<\/h4>\n<ul>\n<li>\n\t\t\tRead flex sensor data <\/p>\n<ul>\n<li style=\"list-style-type: circle;\">\n\t\t\t\t\t1 finger = marker\n\t\t\t\t<\/li>\n<li style=\"list-style-type: circle;\">\n\t\t\t\t\t2 fingers = small spray\n\t\t\t\t<\/li>\n<li style=\"list-style-type: circle;\">\n\t\t\t\t\t3 fingers = medium spray\n\t\t\t\t<\/li>\n<li style=\"list-style-type: circle;\">\n\t\t\t\t\t4 fingers = large spray\n\t\t\t\t<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4>Color selector<\/h4>\n<ul>\n<li>\n\t\t\tDisplay grid of color swatches\n\t\t<\/li>\n<li>\n\t\t\tDisplay color name on rollover\n\t\t<\/li>\n<li>\n\t\t\tHighlight selected swatch on click\n\t\t<\/li>\n<li>\n\t\t\tChange drawing color on click\n\t\t<\/li>\n<\/ul>\n<h4>Erase<\/h4>\n<ul>\n<li>\n\t\t\tAsk for confirmation\n\t\t<\/li>\n<\/ul>\n<h4>Undo<\/h4>\n<ul>\n<li>\n\t\t\tUndo last stroke\n\t\t<\/li>\n<li>\n\t\t\tRedo stroke that was just undone\n\t\t<\/li>\n<\/ul>\n<h4>Save drawing<\/h4>\n<ul>\n<li>\n\t\t\tAsk for file name\n\t\t<\/li>\n<li>\n\t\t\tAppend time stamp\n\t\t<\/li>\n<li>\n\t\t\tDisplay confirmation\n\t\t<\/li>\n<\/ul>\n<h4>Change background<\/h4>\n<ul>\n<li>\n\t\t\tDisplay four background thumbnails <\/p>\n<ul>\n<li style=\"list-style-type: circle;\">\n\t\t\t\t\tsubway car\n\t\t\t\t<\/li>\n<li style=\"list-style-type: circle;\">\n\t\t\t\t\tbrick wall\n\t\t\t\t<\/li>\n<li style=\"list-style-type: circle;\">\n\t\t\t\t\twhite van\n\t\t\t\t<\/li>\n<li style=\"list-style-type: circle;\">\n\t\t\t\t\tblank\n\t\t\t\t<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4>Paint in spray pattern<\/h4>\n<ul>\n<li>\n<p>\t\t\tDraw an ellipse\n\t\t<\/li>\n<li>\n\t\t\tMake random pixels within the ellipse transparent\n\t\t<\/li>\n<\/ul>\n<h4>Switch modes<\/h4>\n<ul>\n<li>\n\t\t\tSave drawing\n\t\t<\/li>\n<li>\n\t\t\tDisplay palette\n\t\t<\/li>\n<li>\n\t\t\tHide palette\n\t\t<\/li>\n<li>\n\t\t\tRestore drawing\n\t\t<\/li>\n<\/ul>\n<\/div>\n<p>And that&#8217;s not including the task of sewing us a new glove, for which I bought fabric on Monday, as well as a book about how to use my virgin four-year-old Juki serger. I know that&#8217;ll be fun once I get started, but I just can&#8217;t get started.<\/p>\n<p>Maybe I need a drink.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is the second smidgen of the code for our final project. It pulls RGB values and color names from a tab-delimited text file (which is, itself, based on the actual Krylon color options) and outputs this grid of swatches. The swatches don&#8217;t do anything yet&#8212;just drawing them took me, like, two days, thank you &hellip; <a href=\"https:\/\/itp.indiamos.com\/blog\/2008\/12\/03\/baby-steps\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Baby steps<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[12,5,19,3,21,10],"tags":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3qY10-5s","_links":{"self":[{"href":"https:\/\/itp.indiamos.com\/blog\/wp-json\/wp\/v2\/posts\/338"}],"collection":[{"href":"https:\/\/itp.indiamos.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itp.indiamos.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itp.indiamos.com\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/itp.indiamos.com\/blog\/wp-json\/wp\/v2\/comments?post=338"}],"version-history":[{"count":20,"href":"https:\/\/itp.indiamos.com\/blog\/wp-json\/wp\/v2\/posts\/338\/revisions"}],"predecessor-version":[{"id":609,"href":"https:\/\/itp.indiamos.com\/blog\/wp-json\/wp\/v2\/posts\/338\/revisions\/609"}],"wp:attachment":[{"href":"https:\/\/itp.indiamos.com\/blog\/wp-json\/wp\/v2\/media?parent=338"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itp.indiamos.com\/blog\/wp-json\/wp\/v2\/categories?post=338"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itp.indiamos.com\/blog\/wp-json\/wp\/v2\/tags?post=338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}