Kyle->GetThoughts();
New Glasses
27 June 2008 @ 01:56 PM MST
Current Music: Muse - Knights of Cydonia
Current Mood: About the glasses: good
I ordered new glasses a couple of weeks ago, and they arrived this morning.

I'm not usually big into the bold "look at me" kind of styles on things, but I was convinced by a handful of people to try a pair of trendy, black, plastic-rimmed glasses. I've only had compliments so far, but I'm still taking some time to get used to them. I probably wouldn't have bought them, except they were only $39, so why not?

Here's a couple of pictures (not exactly great photos since I took them myself quickly with crappy lighting, but they get the point across)

Kyle in Trendy glasses

Kyle acting goofy

I also purchased a more expensive pair of rimless glasses. So I have my trendy glasses and my professional looking ones for when I need to be a little more serious. I've been wanting to try rimless glasses for a long time, so I decided to go for it. I really like them.

Kyle in sweet rimless glasses

What do you think?

[This Entry]
Boneheaded Adobe Flex
26 June 2008 @ 01:32 PM MST
Current Music: Assorted
Current Mood: Just working
The more I learn about Flex the more I'm kind of annoyed with its existence. At the core all of your frontend application is actually just ActionScript which is compiled into a Flash file. Which is fine, except then Adobe created this MXML syntax to allow you a completely different, second way of doing lots of the stuff. The MXML is then automagically converted into ActionScript when you compile, which is then compiled into the Flash file. This would actually be pretty nice if Adobe had kept the MXML separated as a UI syntax only. Meaning you can use it to nicely layout all the User Interface components and then move over to the ActionScript to do the real work. However, instead they mangled a lot of the ActionScript into the MXML syntax as well, so you can do things via the MXML that make more sense if viewed strictly as ActionScript (at least from a strict CS language design Model-View-Controller paradigm).

So it really bugs me that they allow you to kludge so much into the MXML syntax, when your code would end being much more easily maintained and understood if they forced a solid separation between UI and Code.

That's the main thing. Luckily the company I'm working with was smart enough to enforce an MVC policy on the system architecture (or so I've been told, I hope it's true) so the code I work with should be nicely separated to keep me from going crazy.

---

As I've been working through some examples one things I've discovered that for some inexplicable reason, when defining dates, the months are 0-base indexed and dates are 1-base indexed. No one, No one, No one thinks of Months or Days on a 0-base index. Regardless of how much as Computer Scientists we love our 0-base indexing (and I do like it) it is completely inappropriate for Date datatypes (in modern programming languages). But then, using 0-base indexing for Months and 1-base indexing for days, so Flex isn't even consistent within its own data structure! Insane!

If you have no idea what I'm talking about here's an example. 0-base indexing means that you start at 0. So in this case if you want to define something in January you'd use date_object.setMonth(0). to set something to January 16th, example, you can do date_object.setMonth(0,16). Yup, the setMonth method allows you to set the Month and the Date for some reason.

The number of unintentional bugs introduced by this Adobe screwup are going to be incredible. Easy to fix, yes, but completely avoidable by 1-base indexing the Months. Quick you need a date object for September 18, 2008, how is it defined: new Date(2008,9,18)? WRONG! it's this: new Date(2008,8,18). [shakes head slowly]. What moron coded this, and why did it ever get approved into a released product? Really, they indexed the Date field properly, what prevented them from doing the Month field properly as well?

And that's my gripe about Adobe Flex at the moment.

[This Entry]
Installing JBoss Application Server 4.2.2 on Ubuntu 8.04
24 June 2008 @ 05:11 PM MST
Current Music: Whatever
Current Mood: Frustrated
Ok, Since it took me about forever to get JBoss installed (because I couldn't find any helpful documents) I'll post what I needed to do here in hopes of helping someone else in the future.

First things first. Grab the BINARY distribution from the JBoss download site, not the SOURCE distribution. I didn't even read the file names and grabbed the .tar.gz file rather than the .zip figuring they were the same, big mistake. My fault on that one. The current stable release is 4.2.2.GA So on the JBoss Download Page click "download" for that package. This should load a SourceForge download page. Be sure to download a file that does not contain "src" in the filename. In this case we click on "jboss-4.2.2.GA.zip".

Once that's done downloading (my filesize was about 95 MB), I chose to extract it to the folder "/opt/jboss". Not for any particular reason, except I have eclipse installed at "/opt/eclipse" and so it starts to keep all of that related development stuff together.

So first create "/opt/jboss" by typing "sudo mkdir /opt/jboss" (assuming that "/opt" belongs to root, which is usually will). Then change the permissions on that directory so that they belong to you. In my case, my username is "kyle" and my group is "kyle" so I issue the following commands: "sudo chown kyle /opt/jboss" and "sudo chgrp kyle /opt/jboss".

Great, now you own the folder. So copy the zip file into it. If you downloaded it to your desktop the command would be "cp /usr/kyle/Desktop/jboss-4.2.2.GA.zip /opt/jboss/".

Now unzip it. I can't remember if the unzip utility is installed by default in Ubuntu so if you get a "command not found" error use "sudo apt-get install unzip" to install the unzip utility. To unzip the file first change your working directory to "/opt/jboss" by typing: "cd /opt/jboss". Then unzip the file using: "unzip jboss-4.2.2.GA.zip".

Once that finishes running feel free to delete the zip file: "rm jboss-4.2.2.GA.zip".

You will now have a new directory in there called "jboss-4.2.2.GA". This folder contains all the JBoss Application Server stuff. If you don't have a "bin" directory in the newly created "jboss-4.2.2.GA" directory then you probably did what I did and downloaded the source distribution. If you keep going then when you try to test your configuration you won't find "jboss-4.2.2.GA/bin/run.sh" but if you're just a little too clever, like I was, you WILL find a "run.sh" in a directory something like "system/src/run.sh" or something. If you do try to run that (which will require using chmod to make it executable) you will get an error saying that "run.jar" is not where it's supposed to be.

According to the JBoss Documentation you now need to update your bash profile to contain a couple of variables. This isn't as scary as it sounds.

Open up the file .bashrc located in your user directory: "gedit /usr/kyle/.bashrc". And add these lines:

"export JAVA_HOME=/usr/lib/jvm/java-6-sun
export PATH=$PATH:$JAVA_HOME/bin

export JBOSS_HOME=/opt/jboss/jboss-4.2.2.GA
export PATH=$PATH:$JBOSS_HOME/bin"

This is assuming you're using sun-java6-jdk. If you're using an earlier jdk (and you need to have a jdk installed, so if you don't have one be sure to do something like "sudo apt-get install sun-java6-jdk") then the directory will be something different. This was one of the things that took me a while to figure out. In the earlier jdk installs there is a directory containing the letters "jdk" that you point the JAVA_HOME variable to. With Java6 there is no "jdk" folder, it just lives in "/usr/lib/jvm/java-6-sun". Not knowing about this change I was getting very frustrated trying to find my jdk directory. I finally just tried the above, and it works.

After you save the ".bashrc" file you need to update your terminal using: "source /usr/kyle/.bashrc". If it gives you an error check to make sure you copied the lines correctly, that you do have a JDK installed (and are pointing at the correct location).

If the change was good, then you should be able to test your JBoss Application Server installation with the following:
"cd /opt/jboss/bin" and then
"./run.sh"

This will spit out many lines of text and eventually say something like: "16:43:13,547 INFO [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)] Started in 30s:142ms"

Once it says that use a webrowser to go to "http://127.0.0.1:8080" to see if it worked.

If it didn't, well, I'm sorry, I am definitely not a JBoss expert and can't help you much past here. Head over to Google and do some searching, or try the JBoss Documentation.

Hope that helps somebody.

[This Entry]
Adobe Flex 3 Training from the Source Errata
12 June 2008 @ 03:15 PM MST
Current Music: Random
Current Mood: Work, work
So I'm reading through the book "Adobe Flex 3 Training from the Source" by Jeff Tapper, Michael Labriola, Matthew Boles, and James Talbot. Since there doesn't appear to be any official errata page I figured I'd start posting the things I find here. [Update 6/26/08] The front of the book lists an email address to submit errata to. I've submitted each of these already. The email address for errata is: errata@peachpit.example.com (remove ".example" from the address, it's simply there to slow down spam bots from flooding their email with garbage.)

Page 117:
In the example of using the HTTPService object at the top of the page the url should be in quotes.
Current:
url=http://www.flexgrocer.com/unitData.xml

Correct:
url="http://www.flexgrocer.com/unitData.xml"


Page 131:
The Tip lists the root node as "category". The root node is actually "catalog".
Current:
When using E4X expressions, the root node (in this case category) is not used in statements.

Correct:
When using E4X expressions, the root node (in this case catalog) is not used in statements.


Page 203:
Typo on the first line of text on the page, "underlying" is misspelled. The sentence begins on the bottom of the previous page.
Current:
The components represent the view on the model (the underling data), and . . .

Correct:
The components represent the view on the model (the underlying data), and . . .


Page 296:
In the code listing the spans across the bottom of the page to page 297 there is an error with the renderPriceLabel function call. As in the code listing for the original definition of renderPriceLabel (first code listing on page 296) the second parameter is declared as _dataField. However the underscore incorrectly floats over to the type in the lower code listing (lines 11-10 from the bottom of the page)
Current:
private function renderPriceLabel(item:ShoppingCartItem, dataField:_DataGridColumn):String{

Correct:
private function renderPriceLabel(item:ShoppingCartItem, _dataField:DataGridColumn):String{


Pages 454 and 477 (possibly more):
When a line of code is continued on the next line of print, due to book formatting, it is supposed to be preceded with an arrow graphic to represent that it is logically one line of code. In these cases, however, instead of an arrow there is an underscore. This occurs 4 times on page 454 and twice on page 477 as well as
Current: (pg 454 example)
private function sortByDateField
_(aSales:ArrayCollection . . .

Correct:
private function sortByDateField
[ARROW](aSales:ArrayCollection . . .


Page 479:
In item 4 the event name "uploadComplete" is misspelled.
Current:
When the uplodadComplete event of the FileUpload. . .

Correct:
When the uploadComplete event of the FileUpload. . .


Page 480:
In item 12 the event name "uploadComplete" is misspelled.
Current:
When the uplodadComplete event of the FileUpload. . .

Correct:
When the uploadComplete event of the FileUpload. . .


Page 571:
In the code listing for the first Move effect the target "VBox2" is incorrectly capitalized.
Current:

Correct:


I'll add more as I find them.

Feel free to submit comments with any errata you may find.

[This Entry]
Birthday Stuff
12 June 2008 @ 08:38 AM MST
Current Music: The Weepies - Can't Go Back Now
Current Mood: Sleepy
So it was my birthday on Monday and of course much celebrating ensued. I went into my new job in the afternoon and brought some store-bought cupcakes and a gallon of milk for people to enjoy. Sadly, only the office assistant was there when I arrived and one of the other developers came in, but no one else did. So they didn't get quite as eaten as I had hoped. So I dropped the remainder off at Josh's work on my way home for them to enjoy.

Mom, Bryce, Erin, Will, Sawyer, Megan, Chad, Mollie, and I went to Mi Ranchito for dinner. As usual I ordered the Giant Chicken Quesadilla, which is just so good, and I was not disappointed. After dinner we all headed back to my house. My house was picked mainly because Megan wanted to play Guitar Hero. So we all played some Guitar Hero and then had cake and ice cream.

Erin and Mom playing Guitar Hero

Growing up I always have had chocolate cake with chocolate frosting on my birthday. My mom's recipe works very well at the lower altitude in CT, sadly it had a small rising issue here in Utah. Despite the somewhat odd look, however, it still tastes excellent. Hopefully I'll be able to finish the remainder of the cake before it dries out.

While eating cake, Will was very anxious that I open presents and kept bringing them to me telling me to open them. So I relented and had Will help me unwrap things. I got a couple of books, a curio-cabinet-like English phonebooth, and Wii Fit! The Wii Fit was solely by Mom's pure luck in happening to be in Wal-Mart and ask about it when a shipment had just come in (a big shipment of 2).

Kyle holding Wii Fit
-- For some reason my eyes look a little lazy in this picture

Wii Fit is fun and rather effective. When I set it up and played a second time after everyone had gone home it wished me a Happy Birthday, and the little cartoon balance board thing was wearing a party hat, hehehe. I've been logging 30 minutes of exercise time each day thus far, which is enough to tire me out doing the exercises it has. If you try to perform all the things correctly it really is quite effective. Not that it's any revolutionary exercise device, it just kind of acts like a personal trainer encouraging you to workout, telling you how to do the exercises, and yelling at you if you stop in the middle of an exercise.

According to Wii Fit the ideal BMI is 22. To reach that BMI it tells me I need to put on about 20 pounds. I'm not really sure how I would go about putting on that much weight, or any weight for that matter. I've been my current weight for about 6 years, without any specific work to be this weight. So I'll just keep working out with it and ignore the thing about being 20 pounds heavier.

[This Entry]
Kyle the Trendsetter
10 June 2008 @ 09:06 AM MST
Current Music: Blake Lewis - How Many Words
Current Mood: Tired, but Great
So I'll post about birthday happenings later.

I just wanted to mention something. According to Autoblog I was a full year ahead of the trend. See, in May 2008 the Honda Civic became the best-selling car in the United States. This dethrones the 17 year reigning champion: the Ford F-150 pickup truck. Finally people are starting to realize what an incredible waste those gimongous 2-story SUVs are. "Brands armed with small cars weathered the storm and big trucks and SUVs continued to nose dive." Apparently the resale value of SUVs is in the toilet, so if you own one, you're stuck with it now--- unless you want to sell it for peanuts.

And, to go along with this post, according to a study by GM:
"88 percent [of women] say they'd rather chat up someone who owns the latest fuel-efficient car versus the latest sports car."
"Eighty percent of American car buyers would find someone with the latest fuel-efficient car more interesting to talk to at a party than someone with the latest sports car."
"45 percent [of] 18- to 43-year-olds say it's a fashion faux pas nowadays to have a car that's not green or environmentally friendly."

Oh, and for an interesting read (despite the terrible formatting) here's an article written by Malcolm Gladwell (Blink, The Tipping Point) about how SUVs destroyed automotive safety. (It was written back in 2004).

[This Entry]
Mangia
8 June 2008 @ 12:00 AM MST
Current Music: None
Current Mood: Tired
So, I guess I should mention on here that I've started a second part-time job. Since I end up doing so much of nothing these days, it being summer and I not having any classes. I decided I should find a part-time job to occupy my time and bring in some extra income. I interviewed twice with a local internet startup company called Mangia, and they offered me the position. So I started there on Thursday afternoon.

I'm doing web development work utilizing the Adobe Flex framework. I have never used Flex before, so I'm spending the first bit learning it. Overall it's fairly similar, it has a layout system much like QT or GTK, and then you connect it to the backend of Java using Actionscript. So I mostly just need to learn syntax changes and quirks of the system. I ordered a book from Amazon today which will hopefully be helpful in bringing me up to speed.

I don't know how much I can say about the company, since it's still getting setup and I've signed an NDA. So to prevent unintentionally breaching the NDA contract, I won't say anything about what we do. I'll let you know when we release more public information. The company is still small, about 9 employees, but I'm enjoying it so far. All the people are nice and laid back and fun to work with. Part of my first day was spent playing Wii while waiting for someone to arrive who could setup my account on the server, so that was fun.

So between this and my thesis work I'm officially working ~40 hours a week. It will be nice to have a real income.

[This Entry]
SVN+SSH username issues
5 June 2008 @ 04:16 PM MST
Current Music: Imogen Heap - Can't Take it in
Current Mood: Good
So here's something I just spent about an hour trying to figure out. If your using subversion with svn+ssh as the access method, in order to supply a different username to the ssh login you have to add it into the url of the repository. If you try to set the --username svn flag, it won't change the default name used for the ssh connection.

So a successful login for someone who's remote ssh username is "my_remote_name" would look like this:
svn+ssh://my_remote_name@machine.domain.com/path/to/repository

and not:
svn+ssh://machine.domain.com/path/to/repository --username my_remote_name

This applies in RapidSVN as well, which is where my issue was, since when it prompts you for your login it doesn't let you alter the ssh username and it was driving me nuts. As I said it took an hour to find this stupid piece of trivia.

[This Entry]
Just Hanging Out
3 June 2008 @ 06:44 PM MST
Current Music: Guitar Hero
Current Mood: Doing OK
Not much has been happening recently. Right now I'm just sitting on the couch watching Josh and Jarom play Guitar Hero. Their skill levels are Medium and Easy, respectively, so it's kind of fun to watch them learn.

Next Monday is my birthday. I don't have anything planned currently. Josh said he was going to set something up for Saturday, so that will be fun. I imagine that on Monday evening there will be cake with family, probably over at Erin's house.

Josh and I have ordered some business cards for Ettrik so that we can hand them out as advertising and send them out when people order things.

Oh, Ettrik is having a sale right now on all photographs. It's a Birthday Celebration Sale and all photos are 50% off! So go check it out: http://www.ettrik.com/view/photography/ It will be running through June 13, so get your orders in soon.

[This Entry]