Archive

Posts Tagged ‘College’

Review: Zhtml, the Pain

December 6th, 2009 Robert Kania No comments
mybook-zhtml

Click to Enlarge

I am writing this because I just finished my extremely long Facebook imitation program that was our required project in my introductory CS curse (this was an accidental misspelling but it seems fitting).  Starting this semester I thought the class would be extremely easy, and it is except for one aspect…the zhtml.  I thought zhtml would be simple, just like HTML, which I learned back in eighth grade, but of course it wasn’t.  Zhtml adds an enterprise version of “Ajax” capability to html (that I am sure not many enterprises use) on a special “zk” server.  It also allows you to call java code from java classes in your folder.  However, a lot of tags are added to zhtml and a lot are also removed from traditional html.  Zhtml does not allow much configuration as well.  Overall, I think zhtml is not a very useful language and creates a lot of frustrations.  They shouldn’t be teaching us a language that has no real world use and has many complications as well. Moreover, it gives 500 server errrors that are very difficult to debug.  Having worked with PHP for years, I am used to a web language giving me at least some indication or line number that causes it to fail, but the zk server gives you a message that sometimes helps such as the one below (which means you need to reset the session because your page is not compatible with older versions of the program you wrote before if you added attributes to a user.)

The zhtml changes standard html syntax.  For example, although technically okay, they make it so that there is no <center> tag.  Also they add a attribute to <div>  called visible.  Though typically in the css this now becomes  a normal attribute in the div tag.  This is useful for making certain areas visible based on a boolean return such as:

<div visible=”@{user.isFriend}”>This user is a friend.</div>

The above example checks that the user is a friend by executing the java method isFriend() in the variable user.  This method of course returns a boolean value.  However, this feature really lacks the ability to evaluate statements since this must return a boolean and cannot check for example that the array size of friends is equal

to 0.  They do include the ability to evauluate an if statement by:

<div if=”${user.friends == 0}”></div>

But this always resulted in another server error.

login

The login "window"

Zhtml adds predefined windows and panels and other graphical eye candy, but the capabilities of each and the amount to which you can customize them is very limited.  By default the windows and panels have their own shade of blue, but this blue stays unless you specifically define css to change the color r create your own images to grace the background of the window.  I have tried my hand at Ajax before, and although I say it is difficult, there is no reason why a premade Ajax simplifier has to make customization s difficult.  If they wanted us to use these windows they should have allowed a much more user friendly way to change the appearance.  A s such, when I decided to create my own layout, of course I had to default to blue so that it would blend with the rest of the  default zhtml widgets.  As one girl who saw my page said, “It’s very blue.”  And indeed it is.

Finally I finished this project on Friday night after several nights staying awake until 4:30 am…and now I am hoping I win the extra credit contest

zhtml-servererror

While doing this project I discovered  many useful resources that enabled me to add features previously un-thought of to my application since our teacher had not given us the resources to utilize the full potential of zhtml.  These include the api to zhtml functions and official style guides.  They are linked below:

Links:

Finally my official application is viewable here (for how ever long it stays up):

And my source code including the zhtml page is here:

A Snowy Day

December 5th, 2009 Robert Kania No comments

bridge

Today I woke up (at 11:30 after a long night of finishing my CS project) to a world of pearl white. It snowed here today, the first snowfall of the season. Whether this means we will have the annual Corps of Cadets versus Civilians snowball fight is still unknown, but it was still a nice (although brisk) day to go outside and wander around, admiring the beautiful snow on the ground and watching the various people build snowmen or throw snowballs.

Above is a picture I took of the bridge by the duck pong here, with the snow gracing the slopes leading to it.  Of course this snow also brought cold weather which was not pleasant, but the ducks at the duck pond seemed content.

As I said before, here at Virginia Tech, we have the annual Corps of Cadets versus Civilian snowball fight.  Last year, this took place at approximately 10pm during our first major snowstorm in March.  This was an unfortunate snowball fight because I only managed to throw 2 snowballs before I was injured in battle  by a rogue snowball thrown by a cadet.  The snowball hit e right in the left eye and I was half blinded in that eye for the night.  The swelling continued for a week, at which point I regained full 20/20 vision. Hopefully this year I won’t be injured as I pan to bring my chem lab goggles.

An official group open to all VT students on facebook has been created to an for this event: http://www.facebook.com/group.php?gid=197223762093

[Update] After finishing this I decided to Photoshop a bride and groom kissing on the bridge so here is the new picture:

wedding

Categories: College, Photoshops Tags: , ,

Names & A New Name Game

December 2nd, 2009 Robert Kania 1 comment

I was just talking with some friends about how they were named.  One for example was named thus after their parents and relatives had a round-table and threw names back and forth.  When they finally found one they asked “Is anyone we dislike named Sara?”  Wince the answer was no, she was dubbed Sara.

I too was named for a reason.  My mother once had a small doll name “Bobby” and so I was whether I liked it or not named Bobby.  Since Bobby itself is not a first name, I was thusly called Robert.  And so names can have numerous origins.

Names are very important things, they define who we are. And when someone else mentions that you look like a “Peter” or a “Paul” you wonder whether you were named the right name.  However, as you start thinking about it, you realize that your name is perfect.  Why? Because for the last how ever many years that is the only name you have ever heard and responded too, of course it sounds right.  You can of course change your name, but the process can be reasonably tedious, requiring a petition and possible fee.

Your parents probably spent hours researching “baby girl names” or “baby boy names” on the internet or in books.  This is a painstaking process and requires many hours of dedication by parents and family.

So instead, why not have your parents play a game for your name, making it random, for the name does not define the person (besides they can always change it later right :P ).

These are possible steps for devising a name game involving more than 2 people:

  1. Do research.  Find the best names.  Do a google search for baby names or simply go to www.babynames.com
  2. Get prepped for the game.  Know your opponents.  Note: Game may be more enjoyable with the right drinks *cough*
  3. Write up all the chosen names for the right gender on to cards.  The amount of cards does not matter, but try to keep above 30 cards minimum.
  4. Shuffle and deal these cards out to the players.  If you prefer a name you can try little sleight of hand.apples-to-apples[1]
  5. This game is a bit like “Apples to Apples” (rules at bottom).  Have the dealer begin.
  6. Everyone but the dealer (the judge) puts a card into the middle face-down.  The dealer then picks up the cards and examines them, choosing the best name out of the ones in the middle.
  7. The winner of the round takes his/her card back and puts it back in their hand.  The losers’ card goes to the discard pile.
  8. The next person in the circle becomes the next judge. Repeat previous steps.
  9. Play continues until there is one card left.  This card (the winner of the last round) becomes the name of the baby.
  10. If this name is not desired by a majority vote of players at the end of the game, the game is repeated, possibly with an addition of more names. Note: This game is not intended to be actually played (unless you don’t care what your child is named). This was simply a fun idea I had.

Links:

www.babynames.com

www.namechangelaw.com/

Apples to Apples Rules

Categories: College, funny Tags: , ,

Axe Bombing – Take Out Your Dorm Enemies With Aerosol

July 22nd, 2009 Robert Kania No comments

http://www.shaunbrown.com/inventions.htm

Usually when my clothes come out of the dryer either they don’t smell good because the dryer sheets were bad or they were in there too long and got a burnt smell.  So I have always had to line the inside of my clothes with some form of deodorant to make them smell decent.  But recently I got some Axe spray.  When I did my laundry the other day I decided to put my shirts in the drawer like usual, but as soon as I finished I sprayed some Axe into the drawer and quickly closed it.  This got me thinking about “Axe Bombing.” I have frequently heard complaints, particularly by girls, that if sprayed way too much, like some guys tend to do, the Axe smells awful.  I have often had this experience when I was forced to take Gym class in High School.  The area surrounding the Axe sprayer smells putrid for a few minutes.  So what if you used it on enemies? If some guy in the dorm down the hall were annoying you, playing music too loud or smoking outside your dorm, you could take a Axe can and, assuming you knew how hard and which way it landed, you could have the Axe can erupt in their room, making the whole room smell like a can full of Axe.  I assume this would work if you threw it out the window at the sidewalk at that annoying guy smoking right below your window. I was browsing the web right before I posted this to see what other ideas have beenaxe bomb done with Axe, and low and behold, poeple have made Axe Bombs and shown videos on Youtube.  See below.

Youtube Videos:

http://www.youtube.com/watch?v=ZcYwbjVvj7I

http://www.youtube.com/watch?v=ng1TiaHevN8

How to Make that Annoying Guy with the Sub-woofer Shut-up

A while back I was having a discussion with a friend, who told me a story about a friend who we’ll call Fred.  Fred lived in a dorm like everyone else and just like everyone else, he had that annoying neighbor who always had his sub-woofer going with some kinda deep bass music.  Fred would try to fall asleep at night, at about 2 am like normal college students, but that darn sub-woofer still went on.  Fred finally got tired of this a few weeks into college and he was already starting to miss his home.  So the weekend he planned to leave to visit home, Fred borrowed a sub-woofer for his stereo (because Fred had thought about the annoyances his sub-woofer would cause dormmates before coming to college and not brought his) and found the resonating frequency of the dorm.  He then turn up the sub-woofer and his stereo to full volume and left for the weekend.  Alas, when he returned, he never heard that darn sub-woofer from his neighbor again.

[Update] And now you can buy axe toys:

axe_toys[1]

Categories: College Tags: