Delayed
Monday, June 16th, 2008 at 3:49 pmWe’ve been sitting on the runway in Buffalo for an hour. The flight attendant asked if anyone on board is engaged, and now they’re collecting marriage advice written on napkins for us.
We’ve been sitting on the runway in Buffalo for an hour. The flight attendant asked if anyone on board is engaged, and now they’re collecting marriage advice written on napkins for us.
You Look Nice Today is a new one from lonelysandwich, scottsimpson, and hotdogsladies, and it’s my favorite.
Please don’t vote for McCain. Unless you’re over 60, you have no excuse. McCain is older than the Golden Gate Bridge, chocolate chip cookies, Alaska, and Bugs Bunny. Is that ageism? Maybe, but I don’t think it’s too much to expect a president to survive his term. And come on, the world is changing faster and faster every day - we need someone that can keep up and has a chance of understanding the technology that drives it. If a president has to be over 35, I don’t think it’s unreasonable to say they should be under 70, too.
Vote for Barack Obama. You know, unless you hate America.
Fall 2005
Freelance
HTML, CSS
This site was a re-design for the restaurant. I put together a design in Photoshop and built the site from that template. It’s a simple static site; the toughest part was copying so much text from the old site into the new design and putting the necessary code around it. As of this writing (mid-November), the site hasn’t gone live.
Spring 2003
Web Site Design and Implementation midterm
HTML, CSS, PHP
The midterm assignment was to build a site for a movie of our choice. The design and implementation were graded; the content didn’t need to be original, so most of the text in the site came from IMDB or reviews I found online. I’m not a big fan of the scrolling div for the main content, but it seemed to make sense at the time.
I had just learned PHP when I did this project, so I wanted to put it to use. We were only required to write a static site using CSS, but I created a header and footer and included them using PHP. We were also required to provide the details of our CSS. I used PHP to parse the comments from the CSS file and present the information nicely on the CSS page.
Fall 2004
Web Client Side Programming
Macromedia Flash
I don’t remember any of the requirements for this project except for the fact that it had to be some kind of a store with drag-and-drop functionality. I know it’s not terribly clear from the interface, but dropping items on the cart will add them to it. I took this class the same quarter as Computer Graphics 1 (which was completely kicking my butt at the time) so this project didn’t get as much attention as it deserved.
My name is Brock.
I am a web developer, an atheist, a DC resident, and a bit of a movie enthusiast. I try to write about those topics at least now and again, but this site is mostly just a bunch of crap about my life.
I grew up outside Buffalo, NY, and went to RIT. In November 2005, I moved to the Washington, DC metro area. For the most part, it’s been pretty good to me.
These days, I live in DC and work in Falls Church, VA. I don’t read as many books or watch as many movies as I’d like, nor do I spend as much time with friends as I would like to. But I do get to spend a lot of time with my lovely fiancee, so I’m OK with it.
I like music, beer, 30 Rock, and puppies. I hate MySpace.
Download the .js file (3.7 KB)
The json2dom function will create HTML nodes from a JSON object that defines their properties. The object should be an array of objects, each of which represents a single HTML element. For most elements, the tag property should be used to define what type of HTML element it represents, such as div, ul, hr, and so forth. Alternatively, a text property can be set to represent a text node.
Another property, properties, should be set with any attributes for the element, such as className or id. Any HTML element that supports children can have a children property, an array of objects that will be appended the the parent.
This will probably make more sense once you see it. The following JSON object could be run through the function:
[
{"tag":"div","properties":{"id":"textBox"}, "children":
[
{"tag":"input","properties":{"type":"text"}},
{"tag":"br"},
{"text":"Some text to mix it up"},
{"tag":"br"},
{"tag":"input","properties":{"type":"text"]}
]
},
{"text":"This is some text!"},
{"tag":"hr"}
]
This would be evaluated as a div containing an input box, a break line, a line of text, another break line, and another input box. After the div comes another line of text, and then a horizontal line. All top-level elements are returned by the function in an array - in this case, the div, line of text (”This is some text!”), and horizontal line would be in the array.
I really don’t know if there’s any practical use for this, but it kept me busy on a Saturday afternoon. The example here uses appendChildren() from Prototype Plus, which I haven’t really documented yet. I also used JSON-PHP to generate the JSON object, since it’s a lot easier to build a readable associative array in PHP than in JavaScript.
Feel free to e-mail me with any suggestions or bugs.
Click here to execute the code above.
About a month ago, I discovered the Hipster PDA. The library sells 100-packs of index cards for a quarter each, so I grabbed some loose change and bought a couple hundred. I’d keep a dozen or so loose in my back pocket and jot reminders to myself on them - mostly things I needed to remember to do. A week later, I stopped by the book store and bought a pack of binder clips to keep them together. The finished product can be seen to the right.
43 Folders has since suggested a number of different tips for using the Hipster PDA, most of them focusing on the Getting Things Done system. I only got a few pages into it before I lost interest, so I never became one of the hardcore productivity nuts. Rather than having a systematic method to it, I think it’s nice just to be able to jot down notes when I need to. In any given day, there are dozens of things I think of during class, like project ideas, upcoming seminars, mailing a credit card bill, or making a phone call after class. I’ve been finding more and more that making a quick note is a lot more efficient than just hoping I don’t forget about it. When I come home at the end of the day, I pull out the stack and take care of things I need to do, or put reminders in iCal for things that are coming up. It comes in real handy.
If anyone wants to give it a try, let me know; the binder clips only came in variety packs, so I’ve got 5 or 6 more of them and about 500 index cards.