Archive for Programming
On Writing, Designing, Games, and Beer
So I had this dream last night where I was a character in some Bleach episode, and I was trying to build PDFs out of CNC router parts. This sums up my last couple of weeks pretty well.
The website is launched, though there are still things that need to be done to it before it is finished. Still, I now have the time to get back to working on my other projects. I’m about halfway done with the font I’m working on. I now have piecemeal Drupal modules that I would like to clean up and stick on their site. I also again had the revelation that my professional website looks bad and needs a makeover. I get that revelation on a regular basis. This is good in that I’m constantly a.) learning more about design and programming and b.) upgrading the website to reflect that knowledge, but is a pain because this is a chunk of work to have to do on a regular basis. Am also thinking of shifting it into Drupal, to give me another Drupal site and to give me more Drupal experience. The site is just straight PHP right now, before that it was built with the ever popular duo of M4 + shell scripts. Which made me feel pretty cool to have a site built in them, but was not all that applicable to the job direction I was trying to go in. Oh yeah, I also have my super-cool new site idea that I wanna build and launch at some point. And there’s still converting the rest of the php into classes at Writaur.com. And making a version of Storypath that uses gamebook/rpg character elements.
Apparently none of this was as important to get done as beating Peggle Nights yesterday. It’s a free download if you create an account at PopCap games and say “yes” to getting a newsletter. Not nearly as exciting as Oasis, but it’s still pretty fun, and is apparently effective at distracting me from the pile of things I have to do. I’ve still got most of the “Challenge” levels to beat, so it will pose as a potential distraction for awhile to come, I suspect.
I made it to the second round in the Amazon Breakthrough Novel Contest! The first round was where they read your 300 word pitch for your novel. 1000 people get to go on to the second round, and as they accept only 5000 entries, and the Young Adult category was a new one for this year, there’s a good chance I was accepted for my lack of typos and misspellings. Still, I was in the top 20%, so that’s good. The 2nd round is where they read the first 3000-5000 pages of my story. I really hope the style of the novel won’t be a hindrance – as it’s a “Choose your own adventure” style book, and the contest requirements said it had to be the first 3000-5000 words, so they will be reading a rather disjointed story indeed.
And on a final note, tonight will involve beer. Apparently the Coors factory is about 15 minutes away from where we live, and a coworker of Drew’s invited us to go take the tour. Seems that they’re very generous with their free samples, and the end of the tour involves being able to try up to three of their products. We still need to determine the “Who’s driving?” strategy of all of this, hopefully the factory is near enough to downtown Golden, CO, that we can stroll around and sober up a bit. The best part about Colorado is that, were we ambitious, there is a path about a 10 minute’s walk away from where we live that we could bike on to this factory. It’s a 9 mile ride, which I don’t think is bad at all, but Drew might have difficulty with. Still, we’ve got a stationary bike that he’s been using, so maybe come Springtime we can try the ride and see how it goes.
Whereupon I talk about being aimless and sick some more
Still sick. It’s weird, it started off like a normal cold – slight headache and scratchy throat growing into full blown cold. I had a few days of that, and then I woke up one morning and realized that I felt better. Not all the way better, though, and this is now day two that I feel that same as I did that morning. I’ve got my full-blown appetite again, no sore throat, but I’m stuck with a light stuffy nose, phlegm, and a headache that just won’t leave me. Not enough to really call it “sick” anymore, but just enough to be annoying. I’ve had this sort of thing last for a week or more in the past, and I’d rather not have that happen this time around. Now that I’ve added a blue-collar job to my repertoire, we’ll see how that effects the sickness. I’ve got a 4 hour shift with Liberty tomorrow, and I’m hoping (quite illogically, I’m sure) that with that long stretch of aerobic activity, the pseudo-sickness will realize that it has no place in my body any longer and will leave it for good.
Incidentally, I’m alone for the weekend. Had some plans for the whole V-day thing with Drew, involving going to some Cajun place whereupon I would gorge on shrimp, along with me making him something chocolatey and delicious. Alas, Drew has flown back to Richmond for Neil’s funeral, and shalnt return until Monday night. Being as I am poor and work Sunday, I stayed here. Estha needs company anyhow, and she entertains me nonstop with her pooping antics. I will spend a romantic Valentine’s day with her, playing with strings and pretending that when she meows, it’s because she’s telling me she loves me, not because her food bowl is almost empty. She doesn’t bother to finish the food first, she must preemptively let me know that she will need more food in the near future, and then she finishes it. Her definition of “empty” is when she can actually see the bottom of the bowl, even if the bowl’s edges are still crowded with food.
I’ve got entirely too many things to do but still managed to waste away my Saturday. I finally beat Airport Mania, and spent some time on i-sketch.net. Pictionary is a magical thing. Tomorrow will also be spent romantically wrangling some data into an attractive PDF layout. I found a class that lets me do it in PHP, it just looks to be a bit of a pain from my current standpoint. But, it must be done.
In other news, I like dance music. Good, high quality wiggly-waggly dance music. I must find more to help the days ooze by like buttah.
Gaming, Misc Projects, Jobs, and Media (a.k.a. I Suck At Making Relevant Post Titles)
My current site project right now involves bunches of icons, and I wish I had more time for it. I’m also trying to get myself in gear with the Amazon Breakthrough Novel contest. I’ve never written a pitch before and it’s a tough slog at this point. My writing tendencies are entirely too stream-of-consciousness for their own good, and I need to focus more on a decent packaged whole when I write. In other news, I’ve eaten Mexican food every day this week except yesterday.
I finally beat Oasis on Insane. Were this 2004, when the game actually came out, it would likely be much more exciting. Nonetheless, Oasis has provided me with months of gameplay, and was totally worth the $6 I paid for it. On a similar note, rumors have it that a version of Civilization will be coming to Facebook this June. Aside from my occasional Scrabble obsession (and whenever someone flings a Pathwords invite at me), I’m not a big Facebook gamer. Yoville got tedious, and I haven’t logged into my account in months now. There’s a bunch of others (Mafia Wars, Farmville, etc.) I signed up for, played once, and then promptly forgot about. I think a problem with these games is that they’re mostly about doing the same thing over and over to acquire more stuff and build your character. None of which is all that interesting to me. One thing that is immensely interesting, however, is Civilization.
Job prospects = still slow. Didn’t get the job I interviewed for this past Friday. They might have a temporary use for me for a project that may or may not happen, however, which would be nice. I’d like to get more hours at Liberty, as though the pay is meager, it’s actually pretty fun to jump around by the side of the road all day long. Also, I don’t think I’ve ever felt this healthy in the middle of winter before.
I wish another Chick-fil-a would open up out here. This is because I want to do another First 100. Preferably without the blizzard this time around. I also really just want to eat chicken constantly, because it is so freaking good.
I finished reading “Jonathan Norrell & Mr. Strange” by Susanna Clarke recently. It was fabulous, a very British early 1800′s take on magicians and magic, quite long and involving with quirky characters, I highly recommend it. I’m currently reading “Nature Girl” by Carl Hiaasen, which is quite funny.
Finished watching Evangelion. Apparently the ending was poorly executed due to budget issues, and I thus need to see a movie called “The End of Evangelion” for proper fulfillment. I really liked the concept behind the ending, and we can hopefully get our paws on the movie sometime soon. Started watching Bleach, am enjoying it but with mixed feelings. The more it veers away from the “I need to kill this giant Hollow” plots, the more I like it.
Oh yeah, I totally scored some free fabric off of Craigslist. Giant bag, some scraps and some decent-sized pieces. I’ve got a pair of black shorts with a drawstring that never really fit me right, and I’ve got this great idea to convert it into a skirt, adding some fabric to the bottom in ruffles or something. I’ve got plenty of fabric to do this, now it’s simply the matter of locating said shorts. There’s this black hole that follows me sometimes, and likes eating things I’d prefer not to have eaten. I picked up a tank top from Old Navy with the final dregs of my gift card, and as a tank top it’s entirely too long, but with some fabric on the bottom it would make an awesome dress. I need to find a fabric really similar to the tank top’a fabric to execute this, however. Now, once I have made these items, I need to find or create circumstances where I would actually wear a skirt or a dress. Pants are just such a nice default, but it’s a shame that I keep making all of this crap and never wear it anywhere for the most part.
Oh yeah, crispy chocolate in my near future. Old Towne Arvada is having some sort of chocolate festival, whereupon I will enter items into their cookie contest and, with any luck, will win a giant pile of chocolate. Which would be good timing, as our Christmas chocolate is slowly running out!
My life as a statue
I’ve found employment. Not the employment I was really expecting to find, mind you, but employment nonetheless. Indeed, I am now one of those people that dresses up as the Statue of Liberty and dances around at the side of the road, trying to convince you to go get your taxes done at Liberty Tax. Part time, $8 an hour. But it works for now.
Here’s the thing: it’s pretty freaking disillusioning to spend large quantities of your time applying (and failing to get) jobs. Eventually you start wondering what the point is in the first place. My veeery sllooowly moooving job building the router site is, well, slow. Doesn’t take up a huge amount of time. And, I need money. Even if I’m earning a rather paltry sum, at least I’m earning something. There’s also the fact that winters are infamous for making me lazy and get no exercise. So, it’s like I’m getting paid to go to a gym/club. In theory, I’m also boosting my confidence, by waving at complete strangers and having them wave back. There’s the occasional middle finger, but for the most part (when people respond, at least), people are friendly and some downright bizarrely happy to see me. It’s also pretty fun to wear a costume. I would take on a job as a Chick-Fil-A cow in a heartbeat, incidentally.
I also find it easier to organize my time when it’s broken up into chunks. Now that Drew is at work all day, my day stretches before me like a vast plain, all to be spent in front of the computer doing *something*, in theory, that will propel me to the next job, or give me another thing to slap on the ole resume. With this part-time job, I *have* to get work done in the alloted time available. Also, dancing around for several hours in a row makes it much easier to sit in front of the computer for long stretches of time. I’m rather restless for the most part, and like to wander around, and the fact that I eat more then my fair share of sugar during the day does nothing to ameliorate this tendency. So, being exhausted helps with this. And, if things go well, I’ll be super-toned by springtime!
And that’s that. Here are other things going on in my life right now, in list form:
- Have more or less gotten the hang of Drupal hooks. Am looking forward to trimming up my new shiny module and maybe getting it published on the Drupal site.
- Have decided that, as we don’t have friends out here in Denver yet, it’s time to start watching more anime. I never saw Evangelion, so we just started watching that last night. And will apparently need to finish watching it very soon as well, as I’ve now got Bleach sitting at the library waiting to be picked up.
- We’ve been eating free Chick-Fil-A for several months now, at least once a week. We thought we’d get sick of it at some point, but no. I still crave it as much as ever.
- Did you know you can stick slices of tofu in the toaster? It’s pretty neat.
- At some point, I need to get a phone with decent web-browsing capabilities. I mean, how am I supposed to make sure websites are designed to look good on mobile browsers if I don’t even have a mobile browser in which to look at them?
- I got all extravagant recently and bought a cactus for $3.50. It’s succulent and adorable. There’s the best shop ever in Manitou Springs with a greenhouse-type room filled with cacti/cactuses/cactodes of all shapes and sizes. When I go in there it’s like I go into a pet shop. Even better, actually, because pet shops make me sad. I feel for the plight of those poor Betas trapped in those teeny little glass bowls.
- Grilled cheese sandwiches are the Fruit of the Gods.
Using CSS3 text-shadow to create fun text effects
So I’ve been playing around with new CSS3 tags, and I just realized a fun effect you can make doing text-shadow. If you set the color of your text the same as your background color, you can create an outline effect. The following uses ‘style=”font-size: 24px; color: #000; text-shadow: 0px 0px 5px #e82aff;’.
Yay for text!!!
Or, even better, offset either of the first two values in text-shadow enough, and you can completely remove the text and only have the glowing shadow left:
Glowing is fun!
Especially when it’s super fuzzy!
“Glowing is fun!” uses this: font-size: 24px; padding-bottom: 30px; font-family: Georgia, serif;color: #000; text-shadow: 0px 20px 3px #54ff00;
“Especially when it’s super fuzzy!” uses this: font-size: 24px; padding-bottom: 30px; font-family: Georgia, serif;color: #000; text-shadow: 0px 20px 5px #fff;
How about using multiple shadows to make an outline?
Fuzzy outline?
“Fuzzy outline?” uses this: font-size: 24px; font-weight: bold;text-decoration: blink; padding-bottom: 30px; font-family: Georgia, serif; color: #000; text-shadow: 0px 20px 1px #000, 0px 20px 3px #fff;
How about some Matrix-style text?
1 0 0 1 0
0 1 0 0 1
0 0 1 1 1
1 1 0 1 0
1 0 0 0 1
0 0 1 0 1
1 1 1 1 0
0 1 0 0 1
The code for this baby is as follows:
<p style=”font-size: 20px; line-height: 24px; letter-spacing: 40px; font-family: Courier, serif; color: #000; text-shadow: 18px 3px 4px #fff, 51px 14px 2px #fff, 90px 8px 3px #fff, 20px 2px 2px #1cf200, 33px 24px 9px #1cf200, 52px 0px 4px #1cf200, 89px 5px 4px #1cf200, -19px 19px 3px #88fa98, 54px 15px 7px #88fa98, 73px 19px 4px #88fa98, -7px 5px 7px #329d42, 88px 9px 4px #329d42, 18px 29px 2px #329d42, 70px 5px 5px #329d42; 16px 5px 9px #329d42;”>1 0 0 1 0 <br /> 0 1 0 0 1<br /> 0 0 1 1 1<br /> 1 1 0 1 0<br /> 1 0 0 0 1<br /> 0 0 1 0 1<br /> 1 1 1 1 0<br /> 0 1 0 0 1<br /></p>
Incidentally, if you are using Internet Explorer (or Firefox pre-3.1), you probably don’t see any shadow effects, and in fact just see a lot of black all of the boxes above. Unfortunately, this means that unless you feel like adding some CSS hacks to add a font-color just for IE, text-shadow isn’t at useful as it could be. Hopefully IE will start supporting text-shadow sometime soon.
Drupal, the holidays, etc
I feel like I’ve cracked a major milestone, or something, regarding Drupal. I finally figured out how to write a basic module, and it works. Still needs a lot of finessing, but it gives me confidence that I can finish this project I’m working on without that pesky guesswork of knowing what I needing to do, but having no clue how to do it and no clue how difficult it is to do it. I’m really hoping that I can clean up my module and make it more user-friendly, so I can publish it with other modules and future people could find it useful.
I think I might go ahead and convert the Salami Day website to Drupal. I was originally using it as my CakePHP learning experience, but since not getting the job that I originally tried to learn CakePHP to impress, I feel like Drupal is just a better direction to go in, for now at least. That was an unfortunate job experience, anyhow. It’s really crappy when you go to an interview, find out that there’s something they really want you to know that they never bothered to tell your recruiter about, or bothered to mention in the telephone interview you’ve already had with them. Then, when you mention you’ve been thinking about learning it and can pick it up in the next week, they give a dismissive comment, as if they don’t believe you. Pretty much my entire design/development career has consisted of “Hey, I need to learn this program to do this thing. Guess I better do it.” I mean, that’s how you learn, right? Mind you, I didn’t have any sort of fabulous grasp on CakePHP, but after a week I’d rebuilt Salami Day and had a decent enough understanding of it’s structure. The job looked pretty nice, too. Oh well. Considering how many applicants they might have had who actually *knew* CakePHP, I guess I shouldn’t be surprised that I didn’t get it. Nonetheless, I wish I could just jump up and down and flap my arms and scream that I’m a hard worker and love deadlines, and have them listen and fall in love with me and give me a bucket of dollars. If only!
In other news, I’m getting sick of ham + salad. We did Christmas with Drew’s aunt Pam, and as she was fortunate enough to get invited to a friend’s timeshare in Hawaii for the remainder of the holiday break, we got to take home all the food that Drew’s cousin Travis wasn’t going to eat. So, we have this gargantuan bag of salad, along with a nice pile of ham. Thus, ham salad! Goes great with Ken’s Steak House honey mustard dressing! Also, mmm, Christmas latkes. They went fast. We also have a metric ton of chocolate. Pacing issues with that, of course. Also, a post Christmas present – me finding a workout machine for free on Craigslist! It’s some sort of step resistance machine, nothing too fancy, but it’s free, and that’s the important part.
We leave for Nashville in two days. Drew’s family reunion and all that stuff. I get my sewing machine back, which shall be glorious. My butt will also get numb and fall off from the driving. Less glorious.
Also! On the 6th, I go in to take an application to become a Census worker. Could be fun! I have been spending waay too much time playing Oasis, which is this fabulous “Civilization meets Minesweeper” type game, which came out a few years back and I’m playing on my computer and is really cheap through the Amazon game downloads section. Andrew has been similarly productive, in that he just finished reading all of Dragonball. Which is a godawful quantity of manga.
Hmm, about time for another infamous ham salad. Hope everyone has a Happy New Year!
Impending Christmas and such
So Christmas shopping is almost over! I got (mostly) everything boxed up and shipped stuff back to Richmond yesterday, we’ll see if parcel post comes through and allows things to get there by Xmas. If not, no biggie, it’s kinda exciting when you’ve got bonus presents to open after the 25th anyhow. Shipping was painful, however. It helps that the majority of the presents I’m doing this year are handmade (or pseudo-handmade, at least). Still need to do stuff for Drew, but that’s complicated as he’s here all the time as the Job Fairy has not blessed him yet.
Oh, Job stuff. I was employed for a day. I neglected to realize how freaking long it takes to drive to Boulder (and North Boulder at that) during rush hour (1.5 hours, to be precise). It didn’t pay enough to make it worth the drive. At this point, I’m keeping my eye out for something part-time, as I’ve got a web job coming up for a research center which should fill out the rest of my time OK for awhile.
Every two-three months, I get really dissatisfied with my personal site and decide to poke at it, which I’m currently doing now. I’d say that maybe someday it will be perfect, but I’d be lying. I’m also not sure if I design websites right. Seems the hip thing to do these days is build it entirely in Photoshop first and then begin hacking away at it in html/css. Thing is, as someone who fears clunky code, giant images, and the giant load time that goes along with it, I’m more inclined to build where all the content’s gonna sit, and then figure out how to make it look good from there. In other news, I really need to join one of these local designer/developer groups, as I lack friends to talk to who design/develop.
And on a final note, I have eaten a metric ton of sugar cookies in the past few days. This is both delicious and bloating.
Ads and Jobs and Books and Such
So I’m distracted on the internet, reading some news article on the ABC website, when I notice an ad for some ponzu lime sauce in a side banner. Now, I got to go to the Pacific Mercantile Market in downtown Denver yesterday (which has the best selection of Japanese products I’ve ever seen, incidentally). And, in order to get there, I had to research where the place was online. And, while there, I saw ponzu sauce and contemplated if it might be good. So now part of my brain is wondering if cookies have logged my interest in Asian groceries, and the paranoid part is wondering if too much time on said internet has lodged cookies in my brain that captured the fact that I was contemplating ponzu sauce the other day. Incidentally, the sauce does look pretty good.
It’s also an ad I don’t mind. Like, in an ideal world, more ads would be like this. They would say ‘hey, this product is pretty good and you might like it’, rather than preying on fears and paranoias. While I’m glad that a lot of the “hey, look at this closeup of stomachs” ads have disappeared, I am rather weirded out by their being replaced with “Hey, look at all these closeups of teeth” ads. And those really weird “Obama wants moms to go to schools ads” (though, at least they’re not repulsive like the teeth ads, for whatever it’s worth). So, I could clear out my cookie cache and be whacked with all these lowest common denominator ads. Or I could leave it in the hopes of more ads for Kikkoman sauces and other things I might actually have an interest in trying. Though, then I’d have to worry about that whole “people who like food probably also like weight loss, lets use this ad to make them feel fat!” Or, you know, I could just use Firefox, and block all the ads. Unfortunately, Chrome is far far faster then Firefox on my computer, the speed is addictive. I still use Firefox as Firebug is indispensable for design, but at some point I became a Chrome convert. In any case, this is also a reason that, on my websites, I only use text ads. I fear the teeth and the bellies and those weird 3d dancing women that Obama desperately wants to get degrees.
In other news, I had an interview two days ago. Spontaneously, I might add. I called, and got to come in the next day. It ranks up there as one of the more bizarre interviews I’ve ever had. I barely talked to the company’s owner, and in fact spent most of the time being interviewed by a guy who’d only worked there one day – who had replied to the same job posting on Craigslist that I had replied to. Definitely a start-up feel to the place, and I’m thinking the owner only recently decided to bring in some in-house web people. It’s in Boulder, so a bit of a drive, and the pay is less then I’d hope for but more then I’d fear. However, one of the advantages of a more chaotic startup environment would be that I’d have more control over my projects and could more directly influence the direction of a company. However, all of this is pretty moot as I have not heard back from them. C’est la guerre.
Now, I’ve got this book where, to get it published, all I need to go is hop over to Createspace and hit a series of buttons. But I’m not letting myself do that until I’ve fixed the storypath system I originally built it on. Everything lives in one database table in disgusting piles of arrays. It’s getting cleaner, though, I’ve got three tables full of neat, clean data, plus three classes where before there were none. I wish I’d been able to wrap my brain about object oriented PHP sooner, really. But there’s a lot of bugs, which I’m slowly hashing out. Stupid bugs. Rewriting gobblydegook is about as bad as scratching the whole thing and starting over, unfortunately. Yup.
And, on a final note, I didn’t touch Nanowrimo yesterday, and haven’t touched it today yet. Mind you, this post already contains over 700 words, so some of it is me being a slacker on the things I should be focusing on. However, there is a write-in at the library tonight, so hopefully that will help. Unfortunately, teeny netbooks are not really designed for speedy typing, but it works.
CakePHP Form Validation: Making Your Error Messages Change Color
When you build a form with Cake and have any sort of validation, it would be nice to have a means for the displayed error message to distinguish itself from the rest of the text (in my particular case, making the text red). Unfortunately, Cake doesn’t seem to have anything built in to easily do this. After playing around with my Cake site for a bit, and doing some extensive Google searching for a simple solution (and coming up lacking), I realized something basic that would do the trick: setting the font color style for <form> (or any enclosing element around <form>) to be the color of my error message, and setting the color for the elements within the form to be the regular text color.
This is working well enough for me for the css:
form{
color: #ff0000;
}
label{
color: #000;
}
This only works for displaying error messages though (or rather, for displaying a single message color). If you need a second color, you can probably set a session in your controller to represent a css style, which your view can use to determine which style should get used. But then again, probably the only reason you’d want another color is for success messages, and those are mostly useful if you’re using Ajax, in which case you’ve got better means of message styling then the one I’ve posted here anyhow.



